@Test
  public void cliOptionOverridesProfileConfiguration() {
    final ArgumentCaptor<EthNetworkConfig> networkArg =
        ArgumentCaptor.forClass(EthNetworkConfig.class);

    parseCommand("--profile", "dev", "--network", "MAINNET");
    verify(mockControllerBuilderFactory).fromEthNetworkConfig(networkArg.capture(), any());
    verify(mockControllerBuilder).build();

    final EthNetworkConfig config = networkArg.getValue();
    assertThat(config.networkId()).isEqualTo(MAINNET.getNetworkId());
  }
Test if the command line option overrides the profile configuration. The test checks if the
network ID set through a command line option correctly overrides the value specified in the
'dev' profile.
app/src/test/java/org/hyperledger/besu/cli/CascadingDefaultProviderTest.java