@Test
@TestDir
public void validateGroup() throws Exception {

  String dir = TestDirHelper.getTestDir().getAbsolutePath();
  Configuration conf = new Configuration(false);
  conf.set("server.services", StringUtils.join(",", Arrays.asList(GroupsService.class.getName(),
                                                                  ProxyUserService.class.getName())));
  conf.set("server.proxyuser.foo.hosts", "*");
  conf.set("server.proxyuser.foo.groups", getGroup());
  Server server = new Server("server", dir, dir, dir, dir, conf);
  server.init();
  ProxyUser proxyUser = server.get(ProxyUser.class);
  assertNotNull(proxyUser);
  proxyUser.validate("foo", "localhost", System.getProperty("user.name"));
  server.destroy();
}