### Question:
RatingService { public void contributorCodeChangedEventHandler(@Observes ContributorCodeChangedEvent event) { if (event != null && event.getContributorCodeFrom() != null && event.getContributorCodeTo() != null) { ratingPersistenceService .mergeRatingsForContributors(event.getContributorCodeFrom(), event.getContributorCodeTo()); } else { log.warning("Invalid event " + event); } }  void contributorDeletedEventHandler(@Observes ContributorDeletedEvent event); void contentDeletedEventHandler(@Observes ContentDeletedEvent event); void handleContentRatingFields(@Observes ContentBeforeIndexedEvent event); void contributorMergedEventHandler(@Observes ContributorMergedEvent event); void contributorCodeChangedEventHandler(@Observes ContributorCodeChangedEvent event);  }### Answer:
@Test public void contributorCodeChangedEventHandler() { RatingService tested = getTested(); tested.contributorCodeChangedEventHandler(null); verifyZeroInteractions(tested.ratingPersistenceService); reset(tested.ratingPersistenceService); tested.contributorCodeChangedEventHandler(new ContributorCodeChangedEvent(null, null)); verifyZeroInteractions(tested.ratingPersistenceService); reset(tested.ratingPersistenceService); tested.contributorCodeChangedEventHandler(new ContributorCodeChangedEvent("idFrom", null)); verifyZeroInteractions(tested.ratingPersistenceService); reset(tested.ratingPersistenceService); tested.contributorCodeChangedEventHandler(new ContributorCodeChangedEvent(null, "idTo")); verifyZeroInteractions(tested.ratingPersistenceService); reset(tested.ratingPersistenceService); tested.contributorCodeChangedEventHandler(new ContributorCodeChangedEvent("idFrom", "idTo")); verify(tested.ratingPersistenceService).mergeRatingsForContributors("idFrom", "idTo"); }