code: public LdapGroup getGroupTemplate(String cn) {
          LdapGroup group = new LdapGroup(cn, this);
          group.set("dn", getDNForNode(group));
          for (String oc : groupObjectClasses) {
              group.addObjectClass(oc.trim());
          }
          group = (LdapGroup) updateObjectClasses(group);
          // TODO this needs to be cleaner :-/.
  
          // for inetOrgPerson
          if (group.getObjectClasses().contains("shadowAccount")) {
              group.set("uid", cn);
          }
  
          // for groupOfNames
          // First User is always the Principal
          group.addUser((LdapUser) getPrincipal());
          return group;
      }
docs: Returns a basic LDAP-Group-Template for a new LDAP-Group. The Group
  contains always the LDAP-Principal User (for Reading).
  
  @param cn of the new LDAP-Group.
  @return the (pre-filled) Group-Template.