*/
public void testCloneNestablePrincipal() throws Exception
{
SimplePrincipal sp1 = new SimplePrincipal("sp1");
SimplePrincipal sp2 = new SimplePrincipal("sp2");
NestablePrincipal np = new NestablePrincipal("TestStack");
//Add principals to the NestablePrincipal
np.addMember(sp1);
np.addMember(sp2);
assertTrue("np.isMember(sp2)", np.isMember(sp2));
//Clone the NestablePrincipal
NestablePrincipal clonedNP = (NestablePrincipal)np.clone();
//Remove a principal from the orig NestablePrincipal
np.removeMember(sp2);
//Only the active principal is valid
assertFalse("np.isMember(sp2) == false", np.isMember(sp2));
assertTrue("np.isMember(sp1)", np.isMember(sp1));
//Check that the cloned NestablePrincipal is not affected
assertTrue("clonedNP.isMember(sp2)", clonedNP.isMember(sp2));
}