code: private void createRoot(final Partition partition) throws Exception {
          try {
              service.getAdminSession().lookup(partition.getSuffixDn());
          } catch (final LdapNameNotFoundException e) {
              final LdapDN dn = new LdapDN(getRoot());
              final String dc = getRoot().substring(3, getRoot().indexOf(','));
              final ServerEntry entry = service.newEntry(dn);
              entry.add("objectClass", "top", "domain", "extensibleObject");
              entry.add("dc", dc);
              service.getAdminSession().add(entry);
          }
      }
docs: Create the root DN.
  
  @param partition The partition in which to create the root DN.
  @throws Exception If there was an error creating the root DN.