code: void reset() {
          cleanup(); // cleaning up all context before reseting producer registry instance
  
          listeners.clear();
          registry.clear();
  
          String junittest = System.getProperty("JUNITTEST");
          if (junittest != null && junittest.equalsIgnoreCase("true")) // preventing listener's initialization for JUnit run's
              return;
  
          addListener(new JMXBridgeListener());
  
      }
docs: Resets the impl for unittests.