### Question:
ProxyUserService implements FalconService { private void validateGroup(String proxyUser, String user, Set<String> validGroups) throws IOException { if (validGroups != null) { List<String> userGroups = Services.get().<GroupsService>getService(GroupsService.SERVICE_NAME) .getGroups(user); for (String g : validGroups) { if (userGroups.contains(g)) { return; } } throw new AccessControlException( MessageFormat.format("Unauthorized proxyuser [{0}] for user [{1}], not in proxyuser groups", proxyUser, user)); } }  @Override String getName(); @Override void init(); void validate(String proxyUser, String proxyHost, String doAsUser); @Override void destroy(); static final String SERVICE_NAME; }### Answer:
@Test public void testValidateGroup() throws Exception { RuntimeProperties.get().setProperty("falcon.service.ProxyUserService.proxyuser.foo.hosts", "*"); RuntimeProperties.get().setProperty("falcon.service.ProxyUserService.proxyuser.foo.groups", getGroup()); proxyUserService.init(); proxyUserService.validate("foo", "localhost", System.getProperty("user.name")); }