log("hashCodeShouldMatch="+hashCodeShouldMatch);
//Flush the Cache - this should not have any adverse effect on the testSubject
flushAuthenticationCache("deepcopy", anilPrincipal);
context = new InitialContext();
SubjectSecurityManager manager = (SubjectSecurityManager)context.lookup("java:comp/env/security/securityMgr");
Subject testSubject = new Subject();
//Do a validation so that the subject gets added to the cache for the test principal
log("isValid="+manager.isValid(scottPrincipal,"echoman", testSubject));
Subject authSubject = this.getAuthenticatedSubject(manager);
log("AuthenticatedSubject["+authSubject+"]");
log("CopiedSubject["+testSubject+"]");
//Flush the Cache - this should not have any adverse effect on the testSubject
flushAuthenticationCache("deepcopy", anilPrincipal);