### Question:
CustomPublisher implements ApplicationEventPublisherAware { public void publishCustomEvent(CustomEvent customEvent) { publisher.publishEvent(customEvent); }  @Override void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher); void publishCustomEvent(CustomEvent customEvent);  }### Answer:
@Test public void testPublishCustomEvent() throws Exception { CustomPublisher publisher = getBean(CustomPublisher.class); publisher.publishCustomEvent(new CustomEvent(context)); }