@Test
public void testOnConfiguredWhenChangingInitialAdmin() {

    configure(ADMIN_USER.getIdentity(), NIFI_IDENTITIES);
    configure(ADMIN_USER.getIdentity(), NIFI_IDENTITIES);
    configure("admin2", NIFI_IDENTITIES);
    final AccessPolicy readBuckets = policyProvider.getAccessPolicy(
            ResourceFactory.getBucketsResource().getIdentifier(), RequestAction.READ);
    assertNotNull(readBuckets);
    assertEquals(5, readBuckets.getUsers().size());
    assertTrue(readBuckets.getUsers().contains(ADMIN_USER.getIdentifier()));
    assertTrue(readBuckets.getUsers().contains(ADMIN_USER2.getIdentifier()));
    assertTrue(readBuckets.getUsers().contains(NIFI1_USER.getIdentifier()));
    assertTrue(readBuckets.getUsers().contains(NIFI2_USER.getIdentifier()));
    assertTrue(readBuckets.getUsers().contains(NIFI3_USER.getIdentifier()));
}