private void sendEventAndVerify(String newVersion) throws AmbariException {
    HostComponentVersionAdvertisedEvent event = new HostComponentVersionAdvertisedEvent(cluster, sch, newVersion);
    listener.onAmbariEvent(event);

    verifyAll();
  }
Tests that the {@link RepositoryVersionEntity} is not updated if there is
an upgrade, even if the repo ID is passed back and the versions don't
match.

@throws Exception
ambari-server/src/test/java/org/apache/ambari/server/events/listeners/upgrade/StackVersionListenerTest.java