RobotsFactory { @Beta @Nonnull public Robots createDisallowAllRobots() { return createConstantRobots(PathDirective.Field.disallow); } @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 public void givenConfig_whenCreateDisallowAllRobots_thenReturnsValidRobots() { Robots robots = factory.createDisallowAllRobots(); assertRobotsIsValidSingletonWithGivenFieldType(robots, PathDirective.Field.disallow); }