code: @SuppressWarnings("unchecked")
      @Override
      public <T> T onSingletonServiceInit(T service, Object context) {
          if (context == null) {
              return null;
          }
          Map<Class<?>, ManagedObject<?>> newContext = (Map<Class<?>, ManagedObject<?>>) (context);
          if (newContext.isEmpty()) {
              return null;
          }
  
          ManagedObject<?> managedObject = newContext.get(service.getClass());
          Object newServiceObject = null;
          if (managedObject == null) {
              newServiceObject = getInstanceFromManagedObject(service, context);
          } else {
              newServiceObject = managedObject.getObject();
          }
          return (T) newServiceObject;
      }
docs: /*
  (non-Javadoc)
  
  @see com.ibm.ws.jaxrs20.api.JaxRsFactoryBeanCustomizer#onSingletonServiceInit(java.lang.Object, java.lang.Object)