### Question:
UnsupportedDataSourceExceptionMapper implements ExceptionMapper<UnsupportedDataSourceException> { @Override public Response toResponse(UnsupportedDataSourceException exception) { Response.Status status = Response.Status.NOT_ACCEPTABLE; return Response.status(status).entity(new ErrorDescriptor().setErrorCode("data.source.type.not.supported").setMessage(exception.getMessage())).build(); }  @Override Response toResponse(UnsupportedDataSourceException exception);  }### Answer:
@Test public void toResponse(){ final Response result = new UnsupportedDataSourceExceptionMapper() .toResponse(new UnsupportedDataSourceException()); assertNotNull(result); assertNotNull(result.getEntity()); final ErrorDescriptor errorDescriptor = (ErrorDescriptor) result.getEntity(); assertEquals(errorDescriptor.getErrorCode(), "data.source.type.not.supported"); assertEquals(result.getStatus(), 406); }