InetSocketAddressResolver extends AbstractAddressResolver<InetSocketAddress> { @Override public void close() { nameResolver.close(); } InetSocketAddressResolver(EventExecutor executor, NameResolver<InetAddress> nameResolver); @Override void close();  }
@Test public void testCloseDelegates() { @SuppressWarnings("unchecked") NameResolver<InetAddress> nameResolver = mock(NameResolver.class); InetSocketAddressResolver resolver = new InetSocketAddressResolver( ImmediateEventExecutor.INSTANCE, nameResolver); resolver.close(); verify(nameResolver, times(1)).close(); }