@Test public void testResourceNotFoundExceptionMapper() { Response res = mapper.toResponse(new UsernameWasTakenException("test")); assertEquals(res.getStatus(), Response.Status.CONFLICT.getStatusCode()); }
@Override public Response toResponse(UsernameWasTakenException exception) { return Response.status(Response.Status.CONFLICT) .entity(exception.getMessage()) .build(); }
UsernameWasTakenExceptionMapper implements ExceptionMapper<UsernameWasTakenException> { @Override public Response toResponse(UsernameWasTakenException exception) { return Response.status(Response.Status.CONFLICT) .entity(exception.getMessage()) .build(); } }
UsernameWasTakenExceptionMapper implements ExceptionMapper<UsernameWasTakenException> { @Override public Response toResponse(UsernameWasTakenException exception) { return Response.status(Response.Status.CONFLICT) .entity(exception.getMessage()) .build(); }  }
UsernameWasTakenExceptionMapper implements ExceptionMapper<UsernameWasTakenException> { @Override public Response toResponse(UsernameWasTakenException exception) { return Response.status(Response.Status.CONFLICT) .entity(exception.getMessage()) .build(); }  @Override Response toResponse(UsernameWasTakenException exception); }
UsernameWasTakenExceptionMapper implements ExceptionMapper<UsernameWasTakenException> { @Override public Response toResponse(UsernameWasTakenException exception) { return Response.status(Response.Status.CONFLICT) .entity(exception.getMessage()) .build(); }  @Override Response toResponse(UsernameWasTakenException exception);  }