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