private static void replaceSTOMPEventBuses(Class<?> eventPublisherClass,
      Object instance, EventBus agentEventBus, EventBus apiEventBus) {

    try {
      Field agentEventBusField = eventPublisherClass.getDeclaredField("agentEventBus");
      agentEventBusField.setAccessible(true);
      agentEventBusField.set(instance, agentEventBus);

      Field apiEventBusField = eventPublisherClass.getDeclaredField("apiEventBus");
      apiEventBusField.setAccessible(true);
      apiEventBusField.set(instance, apiEventBus);
    } catch (Exception exception) {
      throw new RuntimeException(exception);
    }
  }
Register the normal listeners with the replaced synchronous bus.

@param injector
@param synchronizedBus
ambari-server/src/main/java/org/apache/ambari/server/utils/EventBusSynchronizer.java