@@ -0,0 +1,1388 @@
+package ca.etsmtl.applets.etsmobile.api;%0A%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.junit.runners.JUnit4;%0A%0Aimport ca.etsmtl.applets.etsmobile.model.ApiResponse;%0Aimport okhttp3.MediaType;%0Aimport okhttp3.ResponseBody;%0Aimport retrofit2.Response;%0A%0Aimport static org.hamcrest.CoreMatchers.is;%0Aimport static org.hamcrest.CoreMatchers.nullValue;%0Aimport static org.hamcrest.MatcherAssert.assertThat;%0A%0A@RunWith(JUnit4.class)%0Apublic class ApiResponseTest %7B%0A    @Test%0A    public void exception() %7B%0A        Exception exception = new Exception(%22test%22);%0A        ApiResponse%3CString%3E apiResponse = new ApiResponse%3C%3E(exception);%0A        assertThat(apiResponse.body, nullValue());%0A        assertThat(apiResponse.code, is(500));%0A        assertThat(apiResponse.errorMessage, is(%22test%22));%0A    %7D%0A%0A    @Test%0A    public void success() %7B%0A        ApiResponse%3CString%3E apiResponse = new ApiResponse%3C%3E(Response.success(%22foo%22));%0A        assertThat(apiResponse.errorMessage, nullValue());%0A        assertThat(apiResponse.code, is(200));%0A        assertThat(apiResponse.body, is(%22foo%22));%0A    %7D%0A%0A    @Test%0A    public void error() %7B%0A        ApiResponse%3CString%3E response = new ApiResponse%3C%3E(Response.error(400,%0A                ResponseBody.create(MediaType.parse(%22application/txt%22), %22test%22)));%0A        assertThat(response.code, is(400));%0A        assertThat(response.errorMessage, is(%22test%22));%0A    %7D%0A%7D

Add ApiResponseTest