@Test void testThreeArgConstructor() { Assertions .assertThatExceptionOfType(GenieException.class) .isThrownBy( () -> { throw new GenieException(ERROR_CODE, ERROR_MESSAGE, IOE); } ) .withCause(IOE) .withMessage(ERROR_MESSAGE) .satisfies(e -> Assertions.assertThat(e.getErrorCode()).isEqualTo(HttpURLConnection.HTTP_NOT_FOUND)); }
public int getErrorCode() { return errorCode; }
GenieException extends Exception { public int getErrorCode() { return errorCode; } }
GenieException extends Exception { public int getErrorCode() { return errorCode; } GenieException(final int errorCode, final String msg, final Throwable cause);  GenieException(final int errorCode, final String msg); }
GenieException extends Exception { public int getErrorCode() { return errorCode; } GenieException(final int errorCode, final String msg, final Throwable cause);  GenieException(final int errorCode, final String msg); int getErrorCode(); }
GenieException extends Exception { public int getErrorCode() { return errorCode; } GenieException(final int errorCode, final String msg, final Throwable cause);  GenieException(final int errorCode, final String msg); int getErrorCode();  }