/**
  * Programmatic management of authority factories. Needed for user managed, not plug-in managed,
  * authority factory. Also useful for test cases.
  *
  * @param authority The authority factory to add.
  */
 public static synchronized void addAuthorityFactory(final AuthorityFactory authority) {
   if (registry == null) {
     scanForPlugins();
   }
   getServiceRegistry().registerServiceProvider(authority);
   authorityNames = null;
 }