docs: @SuppressWarnings("unchecked")
      @Override
      public <T> T beforeServiceInvoke(T serviceObject, boolean isSingleton,
                                       Object context) {
          if (isSingleton || context == null) {
              return serviceObject;
          }
  
          Map<Class<?>, ManagedObject<?>> newContext = (Map<Class<?>, ManagedObject<?>>) (context);
          if (newContext.isEmpty()) {
              return null;
          }
  
          Object newServiceObject = null;
  
          newServiceObject = getInstanceFromManagedObject(serviceObject, context);
  
          return (T) newServiceObject;
  
      }