### Question:
ConfigLoader { public Config getConfig() { Config userConfig = getConfigFromCliArgs() .withFallback(ConfigFactory.systemProperties()) .withFallback(ConfigFactory.systemEnvironment()) .withFallback(getUserCustomConfig()) .withFallback(getInstallerConfig()); Config networkBaseConfig = getNetworkDefaultConfig(userConfig); return userConfig.withFallback(networkBaseConfig); } ConfigLoader(CliArgs<NodeCliOptions, NodeCliFlags> cliArgs); Config getConfig();  }### Answer:
@Test public void loadBaseMainnetConfigWithEmptyCliArgs() { Config config = loader.getConfig(); assertThat(config.getString(SystemProperties.PROPERTY_BC_CONFIG_NAME), is("main")); assertThat(config.getBoolean(SystemProperties.PROPERTY_DB_RESET), is(false)); assertThat(config.getString(SystemProperties.PROPERTY_RPC_CORS), is("localhost")); assertThat(config.getBoolean(SystemProperties.PROPERTY_RPC_HTTP_ENABLED), is(true)); }
@Test public void regtestCliFlagOverridesNetworkBaseConfig() { when(cliArgs.getFlags()) .thenReturn(Collections.singleton(NodeCliFlags.NETWORK_REGTEST)); Config config = loader.getConfig(); assertThat(config.getString(SystemProperties.PROPERTY_BC_CONFIG_NAME), is("regtest")); assertThat(config.getBoolean(SystemProperties.PROPERTY_RPC_HTTP_ENABLED), is(true)); }
@Test public void testnetCliFlagOverridesNetworkBaseConfig() { when(cliArgs.getFlags()) .thenReturn(Collections.singleton(NodeCliFlags.NETWORK_TESTNET)); Config config = loader.getConfig(); assertThat(config.getString(SystemProperties.PROPERTY_BC_CONFIG_NAME), is("testnet")); }
@Test public void dbResetCliFlagEnablesReset() { when(cliArgs.getFlags()) .thenReturn(Collections.singleton(NodeCliFlags.DB_RESET)); Config config = loader.getConfig(); assertThat(config.getString(SystemProperties.PROPERTY_BC_CONFIG_NAME), is("main")); assertThat(config.getBoolean(SystemProperties.PROPERTY_DB_RESET), is(true)); }
@Test public void rpcCorsCliOptionEnablesCorsAndChangesHostname() { when(cliArgs.getOptions()) .thenReturn(Collections.singletonMap(NodeCliOptions.RPC_CORS, "myhostname")); Config config = loader.getConfig(); assertThat(config.getString(SystemProperties.PROPERTY_RPC_CORS), is("myhostname")); assertThat(config.getBoolean(SystemProperties.PROPERTY_RPC_HTTP_ENABLED), is(true)); }