@Override
  public void execute(final List<String> args, final PrintWriter terminal) {
    CliCmdUtil.ensureArgCountBounds(args, 0, 1, HELP);

    if (args.isEmpty()) {
      final String setting = requestPipeliningSupplier.get() ? "ON" : "OFF";
      terminal.printf("Current %s configuration: %s%n", NAME, setting);
    } else {
      final String newSetting = args.get(0);
      switch (newSetting.toUpperCase()) {
        case "ON":
          requestPipeliningConsumer.accept(true);
          break;
        case "OFF":
          requestPipeliningConsumer.accept(false);
          break;
        default:
          terminal.printf("Invalid %s setting: %s. ", NAME, newSetting);
          terminal.println("Valid options are 'ON' and 'OFF'.");
          return;
      }
      terminal.println(NAME + " configuration is now " + newSetting.toUpperCase());
    }
  }
@Test
  public void shouldPrintCurrentSettingOfOff() {
    // Given:
    when(settingSupplier.get()).thenReturn(false);

    // When:
    requestPipeliningCommand.execute(Collections.emptyList(), terminal);

    // Then:
    assertThat(out.toString(),
        containsString(String.format("Current %s configuration: OFF", RequestPipeliningCommand.NAME)));
  }