ApolloConfig { public boolean enableIncomingRequestLogging() { return optionalBoolean(apolloNode, "logIncomingRequests").orElse(true); } @Inject  ApolloConfig(Config configNode); String backend(); boolean enableIncomingRequestLogging(); boolean enableOutgoingRequestLogging(); boolean enableMetaApi();  }
@Test public void testEnableIncomingRequestLogging() throws Exception { final Config config = ConfigFactory.parseMap(ImmutableMap.of( "apollo.logIncomingRequests", false )); final ApolloConfig sut = new ApolloConfig(config); assertThat(sut.enableIncomingRequestLogging(), is(false)); }
@Test public void testEnableIncomingRequestLoggingDefault() throws Exception { final Config config = ConfigFactory.parseMap(ImmutableMap.of()); final ApolloConfig sut = new ApolloConfig(config); assertThat(sut.enableIncomingRequestLogging(), is(true)); }