### Question:
NodeOfflineException extends RuntimeException { public URI getUri() { return uri; } NodeOfflineException(URI uri); URI getUri();  }### Answer:
@Test public void createWithUri() { final URI uri = URI.create("http: NodeOfflineException exception = new NodeOfflineException(uri); assertThat(exception.getUri()).isEqualTo(uri); assertThat(exception).hasMessageContaining(uri.toString()); }