### Question:
RefreshEventListener implements ApplicationListener<ApplicationEvent> { @Override public void onApplicationEvent(ApplicationEvent event) { if (isRefreshEvent(event)) { refresh(); } }  @Override void onApplicationEvent(ApplicationEvent event); abstract void refresh();  }### Answer:
@Test void refreshOnEventTest() { applicationListeners.forEach(app -> app.onApplicationEvent(new HeartbeatEvent("source", "state"))); verify(loadBalancer, times(1)).updateListOfServers(); }