MigrationStoragePathSanitizer { static String sanitize(String originalFilePath) { return originalFilePath.replace(FILE_SCHEME_TO_REMOVE, EMPTY); } private  MigrationStoragePathSanitizer();   }
@Test public void stripsScheme_whenOriginalPathContainsFileScheme() { String originalPath = "file:/data/data/com.novoda.downloadmanager.demo.simple/files/Pictures/penguins.dat"; String sanitizedPath = MigrationStoragePathSanitizer.sanitize(originalPath); assertThat(sanitizedPath).isEqualTo("/data/data/com.novoda.downloadmanager.demo.simple/files/Pictures/penguins.dat"); }
@Test public void returnsOriginalPath_whenFileSchemeIsNotPresent() { String originalPath = "/data/data/com.novoda.downloadmanager.demo.simple/files/Pictures/penguins.dat"; String sanitizedPath = MigrationStoragePathSanitizer.sanitize(originalPath); assertThat(sanitizedPath).isEqualTo("/data/data/com.novoda.downloadmanager.demo.simple/files/Pictures/penguins.dat"); }