RobotsLoaderImpl implements RobotsLoader { public void close() throws IOException { charSourceSupplier.close(); } RobotsLoaderImpl(@Nonnull RobotsFactory factory); @Nonnull @Override Robots load(@Nonnull URI robotsResource); void close();  }
@Test public void whenClose_thenCloseCalledOnCharSource() throws IOException { instance.close(); verify(charSourceSupplier).close(); }