@Test public void globalResourcesWithConsumer() throws Exception { AtomicBoolean invoked = new AtomicBoolean(false); this.resourceFactory.addGlobalResourcesConsumer(httpResources -> invoked.set(true)); this.resourceFactory.afterPropertiesSet(); assertTrue(invoked.get()); this.resourceFactory.destroy(); }