@Override
  public <T extends BesuService> void addService(final Class<T> serviceType, final T service) {
    checkArgument(serviceType.isInterface(), "Services must be Java interfaces.");
    checkArgument(
        serviceType.isInstance(service),
        "The service registered with a type must implement that type");
    serviceRegistry.put(serviceType, service);
  }
Add service.

@param <T> the type parameter
@param serviceType the service type
@param service the service
app/src/main/java/org/hyperledger/besu/services/BesuPluginContextImpl.java