PathHelper { public String getNormalizedDirectoryPath(final String path) { if (isDirectoryPath(path)) { return path; } return path + SLASH; }  boolean isPathContainingIllegalCharacters(final String path); String getNormalizedDirectoryPath(final String path); boolean isDirectoryPath(final String originalPath);  }
@Test public void shouldNormalizeDirectoryPath() { assertThat(pathHelper.getNormalizedDirectoryPath("somepath"), is("somepath/")); assertThat(pathHelper.getNormalizedDirectoryPath("somepath/"), is("somepath/")); }