Assert.assertSame(creds, info.get(CREDENTIALS));
}
@Test
public void testGetCredentials() {
final AuthenticationInfo info = new AuthenticationInfo("test");
assertNull(info.get(CREDENTIALS));
assertFalse(info.containsKey(CREDENTIALS));
final Credentials creds = new SimpleCredentials("user", new char[0]);
info.put(CREDENTIALS, creds);
assertSame(creds, info.get(CREDENTIALS));
final String user = "user";
final char[] pwd = new char[5];
final AuthenticationInfo infoCred = new AuthenticationInfo("TEST",
user, pwd);
// credentials not stored in the object
assertFalse(infoCred.containsKey(CREDENTIALS));
}