### Question:
WelcomeLogoApplicationListener implements ApplicationListener<ApplicationEnvironmentPreparedEvent> { @Override public void onApplicationEvent(ApplicationEnvironmentPreparedEvent event) { if (processed.get()) { return; } final Logger logger = LoggerFactory.getLogger(getClass()); String bannerText = buildBannerText(); if (logger.isInfoEnabled()) { logger.info(bannerText); } else { System.out.print(bannerText); } processed.compareAndSet(false, true); }  @Override void onApplicationEvent(ApplicationEnvironmentPreparedEvent event);  }### Answer:
@Test public void testOnApplicationEvent() { Assert.assertNotNull(welcomeLogoApplicationListener.buildBannerText()); }