AcmeNetworkException extends AcmeException { public AcmeNetworkException(IOException cause) { super("Network error", cause); } AcmeNetworkException(IOException cause);   }
@Test public void testAcmeNetworkException() { IOException cause = new IOException("Network not reachable"); AcmeNetworkException ex = new AcmeNetworkException(cause); assertThat(ex.getMessage(), notNullValue()); assertThat(ex.getCause(), is((Throwable) cause)); }