code: @Override
    public List<String> getGroups(String user) throws IOException {
      List<String> groups = CommonUtils.getUnixGroups(user);
      // remove duplicated primary group
      return new ArrayList<>(new LinkedHashSet<>(groups));
    }
docs: Returns list of groups for a user.
  
  @param user get groups for this user
  @return list of groups for a given user