public void execute() {
    Optional<String> login = configuration.get(CoreProperties.LOGIN);
    Optional<String> password = configuration.get(CoreProperties.PASSWORD);

    String warningMessage = null;
    if (password.isPresent()) {
      warningMessage = PASSWORD_WARN_MESSAGE;
    } else if (login.isPresent()) {
      warningMessage = LOGIN_WARN_MESSAGE;
    }

    if (warningMessage != null) {
      if (isScannerDotNet()) {
        warningMessage += SCANNER_DOTNET_WARN_MESSAGE;
      }
      LOG.warn(warningMessage);
      analysisWarnings.addUnique(warningMessage);
    }
  }
@Test
  public void execute_whenUsingPassword_shouldAddWarning() {
    settings.setProperty(CoreProperties.LOGIN, "test");
    settings.setProperty(CoreProperties.PASSWORD, "winner winner chicken dinner");

    underTest.execute();

    verify(analysisWarnings, times(1)).addUnique(PASSWORD_WARN_MESSAGE);
    Assertions.assertThat(logger.logs(Level.WARN)).contains(PASSWORD_WARN_MESSAGE);
  }