DelegateSentryStore implements SentryStoreLayer { @Override public CommitContext alterRoleAddGroups(String component, String role, Set<String> groups, String requestor) throws SentryNoSuchObjectException { return delegate.alterSentryRoleAddGroups(requestor, role, toTSentryGroups(groups)); } DelegateSentryStore(Configuration conf); @Override CommitContext createRole(String component, String role,
      String requestor); @Override CommitContext dropRole(String component, String role, String requestor); @Override Set<String> getAllRoleNames(); @Override CommitContext alterRoleAddGroups(String component, String role,
      Set<String> groups, String requestor); @Override CommitContext alterRoleDeleteGroups(String component, String role,
      Set<String> groups, String requestor); @Override CommitContext alterRoleGrantPrivilege(String component, String role,
      PrivilegeObject privilege, String grantorPrincipal); @Override CommitContext alterRoleRevokePrivilege(String component,
      String role, PrivilegeObject privilege, String grantorPrincipal); @Override CommitContext renamePrivilege(String component, String service,
      List<? extends Authorizable> oldAuthorizables,
      List<? extends Authorizable> newAuthorizables, String requestor); @Override CommitContext dropPrivilege(String component,
      PrivilegeObject privilege, String requestor); @Override Set<String> getRolesByGroups(String component, Set<String> groups); @Override Set<String> getGroupsByRoles(String component, Set<String> roles); @Override Set<PrivilegeObject> getPrivilegesByRole(String component,
      Set<String> roles); @Override Set<PrivilegeObject> getPrivilegesByProvider(String component,
      String service, Set<String> roles, Set<String> groups,
      List<? extends Authorizable> authorizables); @Override Set<MSentryGMPrivilege> getPrivilegesByAuthorizable(String component, String service,
      Set<String> validActiveRoles, 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); }