void () { final String path = "/a/b/c"; final String path2 = "/a1/b1/c1"; myMockLocalFileSystem.add(path); myMockLocalFileSystem.add(path2); myNewMappings.setMapping(path, ourVcsName); myNewMappings.setMapping(path2, ourVcsName); // switch myMockLocalFileSystem.add(path); myMockLocalFileSystem.remove(path); myNewMappings.setMapping(path, "scv"); // remove myMockLocalFileSystem.remove(path2); myNewMappings.removeDirectoryMapping(new VcsDirectoryMapping(path2, ourVcsName)); // add back myMockLocalFileSystem.add(path2); myNewMappings.setMapping(path2, ourVcsName); }