@Test public void liveReloadOnClassPathChanged() throws Exception { configure(); Set<ChangedFiles> changeSet = new HashSet<ChangedFiles>(); ClassPathChangedEvent event = new ClassPathChangedEvent(this, changeSet, false); this.context.publishEvent(event); LiveReloadConfiguration configuration = this.context .getBean(LiveReloadConfiguration.class); configuration.getExecutor().shutdown(); configuration.getExecutor().awaitTermination(2, TimeUnit.SECONDS); LiveReloadServer server = this.context.getBean(LiveReloadServer.class); verify(server).triggerReload(); }