DelegateSentryStore implements SentryStoreLayer { @Override public Object alterRoleAddGroups(String component, String role, Set<String> groups, String requestor) throws Exception { delegate.alterSentryRoleAddGroups(requestor, role, toTSentryGroups(groups)); return null; } DelegateSentryStore(Configuration conf); @Override Object createRole(String component, String role,
      String requestor); @Override Object dropRole(final String component, final String role, final String requestor); @Override Set<String> getAllRoleNames(); @Override Object alterRoleAddGroups(String component, String role,
      Set<String> groups, String requestor); @Override Object alterRoleDeleteGroups(String component, String role,
      Set<String> groups, String requestor); @Override Object alterRoleGrantPrivilege(final String component, final String role,
      final PrivilegeObject privilege, final String grantorPrincipal); @Override Object alterRoleRevokePrivilege(final String component,
      final String role, final PrivilegeObject privilege, final String grantorPrincipal); @Override Object renamePrivilege(final String component, final String service,
      final List<? extends Authorizable> oldAuthorizables,
      final List<? extends Authorizable> newAuthorizables, final String requestor); @Override Object dropPrivilege(final String component,
      final PrivilegeObject privilege, final String requestor); @Override Set<String> getRolesByGroups(String component, Set<String> groups); @Override Set<TSentryRole> getTSentryRolesByGroupName(String component, Set<String> groups); @Override Set<String> getGroupsByRoles(final String component, final Set<String> roles); @Override Set<PrivilegeObject> getPrivilegesByRole(final String component,
      final Set<String> roles); @Override Set<PrivilegeObject> getPrivilegesByProvider(final String component,
      final String service, final Set<String> roles, final Set<String> groups,
      final List<? extends Authorizable> authorizables); @Override Set<MSentryGMPrivilege> getPrivilegesByAuthorizable(final String component,
      final String service, final Set<String> validActiveRoles,
      final List<? extends Authorizable> authorizables); @Override void close();  }
@Test(expected = SentryNoSuchObjectException.class) public void testAddGroupsNonExistantRole() throws Exception { String roleName = "non-existant-role"; String grantor = "grantor"; sentryStore.alterRoleAddGroups(SEARCH, roleName, Sets.newHashSet("g1"), grantor); }