assertTrue("expected non-null subject", subject != null);
assertEquals("Principals", 0, subject.getPrincipals().size());
assertEquals("Private credentials", 1, subject.getPrivateCredentials().size());
assertEquals("GeronimoPasswordCredential private credentials", 1, subject.getPrivateCredentials(GeronimoPasswordCredential.class).size());
assertEquals("Public credentials", 0, subject.getPublicCredentials().size());
GeronimoPasswordCredential pwdCred = (GeronimoPasswordCredential) subject.getPrivateCredentials().toArray()[0];
assertEquals("Username", username, pwdCred.getUserName());
assertEquals("Password", password, new String(pwdCred.getPassword()));
context.logout();
assertEquals("Private credentials upon logout", 0, subject.getPrivateCredentials().size());
assertTrue("id of server subject should be null", ContextManager.getSubjectId(subject) == null);