### Question:
Formats { @VisibleForTesting static File rebase(File file, File existingParent, File newParent) { if (file.getAbsolutePath().equals(existingParent.getAbsolutePath())) return newParent; else return new File(rebase(file.getParentFile(), existingParent, newParent), file.getName()); }  static Observable<Integer> transform(final File input, final File output,
            Pattern pattern, final Transformer<HasFix, HasFix> transformer,
            final Action2<List<HasFix>, File> fixesWriter, final Func1<String, String> renamer);  }### Answer:
@Test public void testRebase() { File f = new File("target/rebase/a/b/c/d"); File input = new File("target/rebase"); File output = new File("target/rebase2"); assertEquals(new File("target/rebase2/a/b/c/d").getAbsolutePath(), Formats.rebase(f, input, output).getAbsolutePath()); }