@@ -0,0 +1,1115 @@
+import org.junit.Before;%0Aimport org.junit.Test;%0Aimport play.mvc.Result;%0Aimport play.test.FakeRequest;%0Aimport play.test.WithApplication;%0A%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0A%0Aimport static org.fest.assertions.Assertions.assertThat;%0Aimport static play.mvc.Http.Status.CREATED;%0Aimport static play.test.Helpers.*;%0Aimport static play.test.Helpers.status;%0A%0A/**%0A * Created by Eveline on 8/03/2015.%0A */%0Apublic class BasestationTest extends WithApplication %7B%0A    @Before%0A    public void setUp()%7B%0A        start(fakeApplication(inMemoryDatabase()));%0A    %7D%0A%0A    @Test%0A    public void addBasestation()%7B%0A        Map%3CString, String%3E data = new HashMap%3C%3E();%0A        data.put(%22name%22, %22Bar1%22);%0A        data.put(%22lattitude%22, %2255.57%22);%0A        data.put(%22longitude%22, %2255.57%22);%0A        data.put(%22altitude%22, %221.0%22);%0A%0A        FakeRequest addRequest = new FakeRequest(%22POST%22, %22/basestations/%22);%0A        addRequest = addRequest.withFormUrlEncodedBody(data);%0A%0A        Result result = routeAndCall(addRequest, 10);%0A        System.out.println(contentAsString(result));%0A        assertThat(status(result)).isEqualTo(CREATED);%0A    %7D%0A%7D%0A

test for adding basestation