RobotsFactory { @Beta @Nonnull public RobotsParser createRobotsParser(@Nonnull Reader reader) { return new RobotsParserImpl(checkNotNull(reader, "reader is null")); } @VisibleForTesting  RobotsFactory(@Nonnull RobotsConfig config, RobotsUtilities utilities, MatcherUtils matcherUtils);  RobotsFactory(@Nonnull RobotsConfig config); @Beta @Nonnull Robots createAllowAllRobots(); @Beta @Nonnull Robots createDisallowAllRobots(); @Beta @Nonnull RobotsUtilities getUtilities(); @Nonnull @Beta RobotsLoader createLoader(); @Beta @Nonnull CharSourceSupplier createCharSourceSupplier(); @Beta @Nonnull ExpressionCompiler createPathExpressionCompiler(); @Beta @Nonnull ExpressionCompiler createAgentExpressionCompiler(); @Beta @Nonnull Cache<URI, Robots> createCache(); @Nonnull RobotsService createService(); @Beta @Nonnull RobotsBuildingParseHandler createRobotsBuildingHandler(); @Beta @Nonnull Client createClient(); @Beta @Nonnull MatcherUtils getMatcherUtils(); @Beta @Nonnull RobotsParser createRobotsParser(@Nonnull Reader reader);  }
@Test(expected = NullPointerException.class) public void givenNullReader_whenCreateRobotsParser_thenThrowsNPE() { factory.createRobotsParser(NULL_READER); }