@Test
public void testGetCanonicalPath() {

    String result = FileNameUtil.getCanonicalPath("/x/y/z");
    result = result.replaceAll("\\\\", "/"); // normalize, for tests on Unix.
    assertThat(result.endsWith("/x/y/z"), CoreMatchers.is(true));
    result = FileNameUtil.getCanonicalPath("build/results/./xyz");
    result = result.replaceAll("\\\\", "/"); // normalize, for tests on Unix.
    assertThat(result.endsWith("build/results/xyz"), CoreMatchers.is(true));
    result = FileNameUtil.getCanonicalPath("classpath://qa/analysis.groovy");
    assertThat(result, CoreMatchers.is("classpath://qa/analysis.groovy"));
}