FileSignature implements Serializable { public static String subpath(String root, String child) { if (child.startsWith(root)) { return child.substring(root.length()); } else { throw new IllegalArgumentException("Expected '" + child + "' to start with '" + root + "'"); } } private  FileSignature(final List<File> files); static FileSignature signAsList(File... files); static FileSignature signAsList(Iterable<File> files); static FileSignature signAsSet(File... files); static FileSignature signAsSet(Iterable<File> files); Collection<File> files(); File getOnlyFile(); static boolean machineIsWin(); static String pathNativeToUnix(String pathNative); static String pathUnixToNative(String pathUnix); static String subpath(String root, String child);  }
@Test public void testSubpath() { assertThat(FileSignature.subpath("root/", "root/child")).isEqualTo("child"); }