code: public static XOManagerFactory createXOManagerFactory(XOUnit xoUnit) {
          if (OSGiUtil.isXOLoadedAsOSGiBundle()) {
              BundleContext bundleContext = FrameworkUtil.getBundle(XOSGi.class).getBundleContext();
              ServiceReference<XOBootstrapService> xoBootstrapServiceReference = bundleContext.getServiceReference(XOBootstrapService.class);
              if (xoBootstrapServiceReference == null) {
                  throw new XOException("Cannot bootstrap XO implementation.");
              }
              XOBootstrapService xoBootstrapService = bundleContext.getService(xoBootstrapServiceReference);
              if (xoBootstrapService == null) {
                  throw new XOException("Cannot bootstrap XO implementation.");
              }
              XOManagerFactory xoManagerFactory = xoBootstrapService.createXOManagerFactory(xoUnit);
              bundleContext.ungetService(xoBootstrapServiceReference);
              if (xoManagerFactory != null) {
                  return xoManagerFactory;
              }
          }
          throw new XOException("Cannot bootstrap XO implementation.");
      }
docs: Create a {@link com.buschmais.xo.api.XOManagerFactory} for the given XO unit.
  <p>
  Internally it performs a lookup in the OSGi service registry to retrieve the
  XOBootstrapService service.
  </p>
  
  @param xoUnit
  The XO unit.
  @return The {@link com.buschmais.xo.api.XOManagerFactory}.