ImpersonationCredentials implements Credentials { public Credentials getBaseCredentials() { return baseCredentials; } ImpersonationCredentials(Credentials baseCredentials, AuthInfo authInfo); Credentials getBaseCredentials(); AuthInfo getImpersonatorInfo();  }
@Test public void testGetBaseCredentials() { Credentials creds = new GuestCredentials(); assertSame(creds, new ImpersonationCredentials(creds, info).getBaseCredentials()); Credentials simpleCreds = new SimpleCredentials("userId", new char[0]); assertSame(simpleCreds, new ImpersonationCredentials(simpleCreds, info).getBaseCredentials()); }