DefaultLoopResources extends AtomicLong implements LoopResources { @Override public boolean isDisposed() { return !running.get(); } DefaultLoopResources(String prefix, int workerCount, boolean daemon);   DefaultLoopResources(String prefix, int selectCount, int workerCount, boolean daemon); @Override @SuppressWarnings("unchecked") Mono<Void> disposeLater(Duration quietPeriod, Duration timeout); @Override boolean isDisposed(); @Override EventLoopGroup onClient(boolean useNative); @Override EventLoopGroup onServer(boolean useNative); @Override EventLoopGroup onServerSelect(boolean useNative); @Override String toString();  }
@Test public void testIssue416() { TestResources resources = TestResources.get(); TestResources.set(ConnectionProvider.create("testIssue416")); assertThat(resources.provider.isDisposed()).isTrue(); assertThat(resources.loops.isDisposed()).isFalse(); TestResources.set(LoopResources.create("test")); assertThat(resources.loops.isDisposed()).isTrue(); assertThat(resources.isDisposed()).isTrue(); }