void (ReplacePathToMacroMap map, String replacements) { for (String s : replacements.split("\n")) { String[] split = s.split(" -> "); String path = split[0], replacement = split[1], description = "For " + path; assertThat(map.substitute(path, true)).describedAs(description).isEqualTo(replacement); assertThat(map.substitute("file:" + path, true)).describedAs(description).isEqualTo("file:" + replacement); assertThat(map.substitute("file:/" + path, true)).describedAs(description).isEqualTo("file:/" + replacement); assertThat(map.substitute("file://" + path, true)).describedAs(description).isEqualTo("file://" + replacement); assertThat(map.substitute("jar:" + path, true)).describedAs(description).isEqualTo("jar:" + replacement); assertThat(map.substitute("jar:/" + path, true)).describedAs(description).isEqualTo("jar:/" + replacement); assertThat(map.substitute("jar://" + path, true)).describedAs(description).isEqualTo("jar://" + replacement); } }