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