PlcTimeoutException extends PlcRuntimeException { public long getTimeout() { return timeout; } PlcTimeoutException(long timeout); long getTimeout();  }
@Test public void simpleStringConstructor() { PlcTimeoutException exception = assertThrows(PlcTimeoutException.class,() -> { throw new PlcTimeoutException(1024L); }); assertThat(exception.getTimeout(), equalTo(1024L)); }