This repository was archived by the owner on Dec 3, 2023. It is now read-only.

Description
The binding list order should not matter for the equivalence of Policy objects:
@Test
public void testPolicyOrderShouldNotMatter() {
Role role1 = Role.of("role1");
Identity identity1 = Identity.user("[email protected]");
Role role2 = Role.of("role2");
Identity identity2 = Identity.user("[email protected]");
Policy policy1 = Policy.newBuilder()
.addIdentity(role1, identity1)
.addIdentity(role2, identity2)
.build();
Policy policy2 = Policy.newBuilder()
.addIdentity(role2, identity2)
.addIdentity(role1, identity1)
.build();
assertEquals(policy1, policy2);
}