RobotsServiceImpl implements RobotsService { @Override public void close() throws IOException { loader.close(); } RobotsServiceImpl(@Nonnull RobotsLoader loader, @Nonnull RobotsUtilities utilities, MatcherUtils matcherUtils); @Override boolean isAllowed(@Nonnull String crawlerAgentString, @Nonnull URI resourceUri); @Override void close();  }
@Test public void whenClose_thenCloseCalledOnLoader() throws IOException { instance.close(); verify(loader).close(); }