@Test
  public void cliOptionOverridesEnvVariableAndConfig() {
    final String configFile = this.getClass().getResource("/partial_config.toml").getFile();
    final String expectedCoinbase = "0x0000000000000000000000000000000000000006";
    setEnvironmentVariable("BESU_MINER_COINBASE", "0x0000000000000000000000000000000000000004");
    parseCommand("--config-file", configFile, "--miner-coinbase", expectedCoinbase);

    final var captMiningParameters = ArgumentCaptor.forClass(MiningConfiguration.class);
    verify(mockControllerBuilder).miningParameters(captMiningParameters.capture());

    assertThat(captMiningParameters.getValue().getCoinbase())
        .contains(Address.fromHexString(expectedCoinbase));
  }
Test if the command line option overrides the environment variable and configuration. The test
checks if the value of the miner's coinbase address set through a command line option correctly
overrides the value specified in the environment variable and the configuration file.
app/src/test/java/org/hyperledger/besu/cli/CascadingDefaultProviderTest.java