@Test public void testPathsWithEnvironmentVariables() throws Exception { final EnvironmentVariableReplacer replacer = new EnvironmentVariableReplacer(variableAccessor); SoftAssertions.assertSoftly(softly -> { softly.assertThat(replacer.hasUnknownEnvironmentVariables("%{a}")).isTrue(); softly.assertThat(replacer.hasUnknownEnvironmentVariables("%{a}/%{b}/%{c}/file.txt")).isTrue(); softly.assertThat(replacer.hasUnknownEnvironmentVariables("%{a%{b%{c}}}/file.txt")).isTrue(); }); verifyNoInteractions(variableAccessor); }
public boolean hasUnknownEnvironmentVariables(final String path) { return ENV_VAR_PATTERN.matcher(path).find(); }
EnvironmentVariableReplacer { public boolean hasUnknownEnvironmentVariables(final String path) { return ENV_VAR_PATTERN.matcher(path).find(); } }
EnvironmentVariableReplacer { public boolean hasUnknownEnvironmentVariables(final String path) { return ENV_VAR_PATTERN.matcher(path).find(); } EnvironmentVariableReplacer();  EnvironmentVariableReplacer(final SystemVariableAccessor variableAccessor);  EnvironmentVariableReplacer(final SystemVariableAccessor variableAccessor,
            final Consumer<String> problemHandler); }
EnvironmentVariableReplacer { public boolean hasUnknownEnvironmentVariables(final String path) { return ENV_VAR_PATTERN.matcher(path).find(); } EnvironmentVariableReplacer();  EnvironmentVariableReplacer(final SystemVariableAccessor variableAccessor);  EnvironmentVariableReplacer(final SystemVariableAccessor variableAccessor,
            final Consumer<String> problemHandler); boolean hasUnknownEnvironmentVariables(final String path); String replaceKnownEnvironmentVariables(final String path); }
EnvironmentVariableReplacer { public boolean hasUnknownEnvironmentVariables(final String path) { return ENV_VAR_PATTERN.matcher(path).find(); } EnvironmentVariableReplacer();  EnvironmentVariableReplacer(final SystemVariableAccessor variableAccessor);  EnvironmentVariableReplacer(final SystemVariableAccessor variableAccessor,
            final Consumer<String> problemHandler); boolean hasUnknownEnvironmentVariables(final String path); String replaceKnownEnvironmentVariables(final String path);  }