### Question:
OperationCancelledExceptionMapper implements ExceptionMapper<OperationCancelledException> { @Override public Response toResponse(OperationCancelledException exception) { return Response.status(403).entity(exception.getErrorDescriptor()).build(); }  @Override Response toResponse(OperationCancelledException exception);  }### Answer:
@Test public void toResponse(){ final ErrorDescriptor expectedErrorDescriptor = new ErrorDescriptor(); final Response result = new OperationCancelledExceptionMapper() .toResponse(new OperationCancelledException(expectedErrorDescriptor, new RuntimeException())); assertNotNull(result); assertSame(result.getEntity(), expectedErrorDescriptor); assertEquals(result.getStatus(), 403); }