FrameworkException extends RuntimeException { public FrameworkErrorCode getErrcode() { return errcode; } FrameworkException();  FrameworkException(FrameworkErrorCode err);  FrameworkException(String msg);  FrameworkException(String msg, FrameworkErrorCode errCode);  FrameworkException(Throwable cause, String msg, FrameworkErrorCode errCode);  FrameworkException(Throwable th);  FrameworkException(Throwable th, String msg); FrameworkErrorCode getErrcode(); static FrameworkException nestedException(Throwable e); static FrameworkException nestedException(String msg, Throwable e); static SQLException nestedSQLException(Throwable e); static SQLException nestedSQLException(String msg, Throwable e);  }
@Test public void testGetErrcode() { try { message.print4(); } catch (FrameworkException e) { assertThat(e).isInstanceOf(FrameworkException.class).hasMessage( FrameworkErrorCode.UnknownAppError.getErrMessage()); assertThat(e.getErrcode()).isEqualTo(FrameworkErrorCode.UnknownAppError); } }