code: static ChaiProviderImplementor forProvider(
              final ChaiProviderImplementor chaiProvider
      )
      {
          //check to make sure watchdog ise enabled;
          final boolean watchDogEnabled = Boolean.parseBoolean( chaiProvider.getChaiConfiguration().getSetting( ChaiSetting.WIRETRACE_ENABLE ) );
          if ( !watchDogEnabled )
          {
              final String errorStr = "attempt to obtain WireTrace wrapper when watchdog is not enabled in chai config";
              LOGGER.warn( errorStr );
              throw new IllegalStateException( errorStr );
          }
  
          if ( Proxy.isProxyClass( chaiProvider.getClass() ) && chaiProvider instanceof WireTraceWrapper )
          {
              LOGGER.warn( "attempt to obtain WireTraceWrapper wrapper for already wrapped Provider." );
              return chaiProvider;
          }
  
          return ( ChaiProviderImplementor ) Proxy.newProxyInstance(
                  chaiProvider.getClass().getClassLoader(),
                  chaiProvider.getClass().getInterfaces(),
                  new WireTraceWrapper( chaiProvider ) );
      }
docs: Wrap a pre-existing ChaiProvider with a WatchdogWrapper instance.
  
  @param chaiProvider a pre-existing {@code ChaiProvider}
  @return a wrapped {@code ChaiProvider} instance.