KerberosAuthority implements Authority { public void setInitState(Exception exc) { initState = exc; } KerberosAuthority(String servicePrincipal, String keyTabConfFile, String jaasConfigSection);  KerberosAuthority(); Exception getInitState(); void setInitState(Exception exc); long getLoginWindow(); void setLoginWindow(long loginWindowMillis); long getLastLogin(); @Override void initialize(); @Override String getID(); @SuppressWarnings({ "unchecked", "rawtypes" }) synchronized void login(boolean logoutFirst); boolean refreshLogin(String remoteSvcPrincipal); @Override String getDomain(); @Override String getHeader(); @Override String getAuthenticateChallenge(); @Override Principal authenticate(String creds, String remoteAddr, String httpMethod, StringBuilder errMsg);  }
@Test(groups="kerberos-tests") public void testSetInitState() throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException { Class<KerberosAuthority> c = KerberosAuthority.class; KerberosAuthority check = new KerberosAuthority(); check.setInitState(null); Field f = c.getDeclaredField("initState"); f.setAccessible(true); Exception m = (Exception) f.get(check); assertNull(m); }