public String replaceSecretInfo(String line) {
        if (line == null) {
            return null;
        }
        for (CommandArgument argument : arguments) {
            line = argument.replaceSecretInfo(line);
        }
        for (SecretString secret : secrets) {
            line = secret.replaceSecretInfo(line);
        }
        return line;
    }
@Test
    void shouldReplaceSecretInfoShouldNotFailForNull() {
        ArrayList<CommandArgument> commands = new ArrayList<>();
        commands.add(new PasswordArgument("foo"));
        ArrayList<SecretString> secretStrings = new ArrayList<>();
        secretStrings.add(new PasswordArgument("foo"));
        ConsoleResult result = new ConsoleResult(10, new ArrayList<>(), new ArrayList<>(), commands, secretStrings);
        assertThat(result.replaceSecretInfo(null)).isNull();
    }