@@ -0,0 +1,1100 @@
+package fr.insee.pogues.jersey;%0A%0Aimport fr.insee.pogues.webservice.rest.PoguesException;%0Aimport fr.insee.pogues.webservice.rest.PoguesExceptionMapper;%0Aimport fr.insee.pogues.webservice.rest.RestMessage;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport javax.ws.rs.core.MediaType;%0Aimport javax.ws.rs.core.Response;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.mockito.Mockito.spy;%0A%0Apublic class TetsPoguesExceptionMapper %7B%0A%0A    PoguesExceptionMapper mapper;%0A%0A    @Before%0A    public void setUp()%7B%0A        mapper = spy(new PoguesExceptionMapper());%0A    %7D%0A%0A    @Test%0A    public void toResponse()%7B%0A        PoguesException e = new PoguesException(418, %22I'm a teapot%22, %22Strange things happen%22);%0A        RestMessage m = e.toRestMessage();%0A        Response resp = mapper.toResponse(e);%0A        assertEquals(MediaType.APPLICATION_JSON_TYPE, resp.getMediaType());%0A        assertEquals(m.getMessage(), ((RestMessage)resp.getEntity()).getMessage());%0A        assertEquals(m.getDetails(), ((RestMessage)resp.getEntity()).getDetails());%0A        assertEquals(418, resp.getStatus());%0A    %7D%0A%7D%0A

Add Jersey Exception Mapper test