RobotsFactory { @Beta @Nonnull public Client createClient() { Client client = ClientBuilder.newClient() .register(new FollowRedirectsFilter(config.getMaxRedirectHops())) .register(new HttpStatusHandler()) .register(new LoggingClientFilter(this.getClass(), LogLevel.TRACE)); client.property(ClientProperties.READ_TIMEOUT, config.getReadTimeoutMillis()); return client; } @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 whenCreateClient_thenReturnsValidClient() { Client client = factory.createClient(); assertThat(client, notNullValue()); }