PathUtils { public static boolean isSameFullPath(String file, String file2) { String fullPath = FilenameUtils.getFullPath(file); String fullPath2 = FilenameUtils.getFullPath(file2); return StringUtils.equals(fullPath, fullPath2); }  static boolean isSameFullPath(String file, String file2);  }
@Test public void testIsSameFullPath() { String file1 = "src/main/java/br/com/utfpr/a/A.java"; String file2 = "src/main/java/br/com/utfpr/a/B.java"; String file3 = "src/main/java/br/com/utfpr/b/A.java"; String file4 = "src/main/java/br/com/utfpr/b/B.java"; Assert.assertTrue(PathUtils.isSameFullPath(file1, file2)); Assert.assertTrue(PathUtils.isSameFullPath(file3, file4)); Assert.assertFalse(PathUtils.isSameFullPath(file1, file3)); Assert.assertFalse(PathUtils.isSameFullPath(file1, file4)); Assert.assertFalse(PathUtils.isSameFullPath(file2, file3)); Assert.assertFalse(PathUtils.isSameFullPath(file2, file4)); }