IdMaskSecurityException extends SecurityException { public Reason getReason() { return reason; } IdMaskSecurityException(String s, Reason reason);  IdMaskSecurityException(String message, Reason reason, Throwable cause); Reason getReason(); @Override String getMessage();  }
@Test public void getReason() { for (IdMaskSecurityException.Reason reason : IdMaskSecurityException.Reason.values()) { assertEquals(reason, new IdMaskSecurityException("test", reason).getReason()); } }