UserAuthority implements Authority { @Override public boolean allowAuthorization() { return false; } UserAuthority(); @Override void initialize(); @Override String getID(); @Override String getDomain(); @Override String getHeader(); @Override String getAuthenticateChallenge(); @Override boolean allowAuthorization(); @Override Principal authenticate(String creds, String remoteAddr, String httpMethod, StringBuilder errMsg); static final String ATHENZ_AUTH_CHALLENGE; }
@Test public void testAllowAuthorization() { PAM pam = Mockito.mock(PAM.class); UserAuthority userAuthority = new UserAuthority(); userAuthority.setPAM(pam); assertFalse(userAuthority.allowAuthorization()); }