@Test
public void testAddAccessPolicy() {

    configure();
    assertEquals(0, getPolicyCount());
    final AccessPolicy policy = new AccessPolicy.Builder()
            .identifierGenerateRandom()
            .resource("/buckets")
            .action(RequestAction.READ)
            .addUser("user1")
            .addGroup("group1")
            .build();
    final AccessPolicy createdPolicy = policyProvider.addAccessPolicy(policy);
    assertNotNull(createdPolicy);
    final AccessPolicy retrievedPolicy = policyProvider.getAccessPolicy(policy.getIdentifier());
    verifyPoliciesEqual(policy, retrievedPolicy);
}