!principals.contains(new Principal("Owner")));
}
public void testModifyPrincipalsIfOwner() {
Mock ownable = mock(Ownable.class);
ownable.expects(once()).method("getOwner").will(returnValue(new Principal("TestOwner")));
AccessContext context = new OwnerAccessContext((Ownable) ownable.proxy());
Set principals = new HashSet();
principals.add(new Principal("TestOwner"));
context.modifyPrincipals(principals);
assertTrue("Owner principal was added to list.",
principals.contains(new Principal("Owner")));
}