GroupsService extends BaseService implements Groups { @Override protected void init() throws ServiceException { Configuration hConf = new Configuration(false); ConfigurationUtils.copy(getServiceConfig(), hConf); hGroups = new org.apache.hadoop.security.Groups(hConf); } GroupsService(); @Override Class getInterface(); @Deprecated @Override List<String> getGroups(String user); @Override Set<String> getGroupsSet(String user);  }
@Test(expected = RuntimeException.class) @TestDir public void invalidGroupsMapping() throws Exception { String dir = TestDirHelper.getTestDir().getAbsolutePath(); Configuration conf = new Configuration(false); conf.set("server.services", StringUtils.join(",", Arrays.asList(GroupsService.class.getName()))); conf.set("server.groups.hadoop.security.group.mapping", String.class.getName()); Server server = new Server("server", dir, dir, dir, dir, conf); server.init(); }