}
public void testPam() throws Exception {
if(!SGEUtil.isWindows()) {
TestConfiguration config = TestConfiguration.getInstance();
AuthUserWrapper wrapper = AuthUserWrapper.newInstanceForPam(authuser.getAbsolutePath(), config.getPamService());
Set principals = wrapper.authenticate(config.getTestUser(), config.getTestUserPassword());
assertNotNull("no principals found", principals);
Iterator iter = principals.iterator();
while(iter.hasNext()) {
LOGGER.log(Level.FINE,"user {0} has principal {1}", new Object [] { config.getTestUser(), iter.next() });
}
principals = wrapper.authenticate(config.getTestUser(), new char[0]);
assertNull("login which empty password successeded", principals);
}
}