PathHelper { public boolean isDirectoryPath(final String originalPath) { return originalPath.substring(originalPath.length() - 1).equals(SLASH); }  boolean isPathContainingIllegalCharacters(final String path); String getNormalizedDirectoryPath(final String path); boolean isDirectoryPath(final String originalPath);  }
@Test public void shouldSayWhetherDirectoryPath() { assertThat(pathHelper.isDirectoryPath("somepath"), is(false)); assertThat(pathHelper.isDirectoryPath("somepath/"), is(true)); }