### Question:
NodeOfflineExceptionMapper implements ExceptionMapper<NodeOfflineException> { @Override public Response toResponse(NodeOfflineException exception) { LOGGER.warn("{} is unavailable assuming disconnection",exception.getUri()); discovery.onDisconnect(exception.getUri()); return Response.status(Response.Status.GONE.getStatusCode(),exception.getMessage()) .build(); } NodeOfflineExceptionMapper(); protected  NodeOfflineExceptionMapper(Discovery discovery); @Override Response toResponse(NodeOfflineException exception);  }### Answer:
@Test public void toResponse() { URI uri = URI.create("http: final NodeOfflineException exception = new NodeOfflineException(uri); final Response result = exceptionMapper.toResponse(exception); verify(discovery).onDisconnect(uri); assertThat(result.getStatus()).isEqualTo(Response.Status.GONE.getStatusCode()); assertThat(result.getStatusInfo().getReasonPhrase()) .isEqualTo("Connection error while communicating with http: }