private void verifyCall(
      final Logger logger,
      final String dependentOptions,
      final String dependencyWarningMsg,
      final String... mainOptions) {

    final ArgumentCaptor<String> stringArgumentCaptor = ArgumentCaptor.forClass(String.class);

    verify(logger)
        .warn(
            stringArgumentCaptor.capture(),
            stringArgumentCaptor.capture(),
            stringArgumentCaptor.capture());
    assertThat(stringArgumentCaptor.getAllValues().get(0)).isEqualTo(dependencyWarningMsg);
    assertThat(stringArgumentCaptor.getAllValues().get(1)).isEqualTo(dependentOptions);

    final String joinedMainOptions =
        StringUtils.joiningWithLastDelimiter(", ", " or ").apply(Arrays.asList(mainOptions));
    assertThat(stringArgumentCaptor.getAllValues().get(2)).isEqualTo(joinedMainOptions);
  }
Check logger calls

<p>Here we check the calls to logger and not the result of the log line as we don't test the
logger itself but the fact that we call it.

@param dependentOptions the string representing the list of dependent options names
@param mainOptions the main option name
app/src/test/java/org/hyperledger/besu/cli/CommandLineUtilsTest.java