@Test
public void shouldApplyModifier() throws Exception
{

    ClassPathModifier  modifier   = mock(ClassPathModifier.class, "Mod");
    PlatformSeparators separators = mock(PlatformSeparators.class, "Sep");
    ClassPath          path       = new ClassPath("foo.jar", "bar.jar");
    when(separators.getPathSeparator()).thenReturn("$");
    when(modifier.modify(anyString())).thenReturn("modified-path");
    String pathString = path.toString(separators, modifier);
    assertThat(pathString, is("modified-path"));
    verify(modifier).modify("foo.jar$bar.jar");
}