code: public Principal mapPrincipal(String name)
     {
        if (principals != null)
        {
           String mapping = principals.get(name);
  
           if (mapping != null)
           {
              return new SimplePrincipal(mapping);
           }
        }
  
        return null;
     }
docs: {@inheritDoc}