public boolean isAdmin(Admin admin) {
        return !isSecurityEnabled() || noAdminsConfigured() || adminsConfig.isAdmin(admin, rolesConfig.memberRoles(admin));
    }
@Test
    public void shouldValidateRoleAsAdmin() throws Exception {
        SecurityConfig security = security(passwordFileAuthConfig(), admins(role("role2")));
        assertThat(security.isAdmin(new AdminRole(new CaseInsensitiveString("role2"))), is(true));
    }