@@ -0,0 +1,1409 @@
+package controllers;%0A%0Aimport com.google.common.collect.ImmutableMap;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport play.mvc.Result;%0Aimport play.test.WithApplication;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertNull;%0Aimport static play.test.Helpers.callAction;%0Aimport static play.test.Helpers.fakeApplication;%0Aimport static play.test.Helpers.fakeRequest;%0Aimport static play.test.Helpers.session;%0Aimport static play.test.Helpers.status;%0A%0A%0Apublic class AuthTest extends WithApplication %7B%0A%0A    @Before%0A    public void setUp() %7B%0A        start(fakeApplication());%0A    %7D%0A%0A    @Test%0A    public void authenticateSuccess() %7B%0A        Result result = callAction(%0A            controllers.routes.ref.Application.authenticate(),%0A            fakeRequest().withFormUrlEncodedBody(ImmutableMap.of(%0A                %22email%22, %22foo@bar.com%22,%0A                %22password%22, %22password%22)));%0A        assertEquals(status(result), 303);%0A        assertEquals(session(result).get(%22email%22), %22foo@bar.com%22);%0A    %7D%0A%0A    @Test%0A    public void authenticateFailure() %7B%0A        Result result = callAction(%0A            controllers.routes.ref.Application.authenticate(),%0A            fakeRequest().withFormUrlEncodedBody(ImmutableMap.of(%0A                %22email%22, %22%22,%0A                %22password%22, %22%22)));%0A        assertEquals(status(result), 400);%0A        assertNull(session(result).get(%22email%22));%0A    %7D%0A%0A%7D%0A

Implement tests for authenticate action.