@Test public void translatorShouldSplitKeyAccordingToValue() { initPrefs("fruit", "pear_anjou"); PrefMigrator.migrate(prefs, KEY_SPLITTER); assertPrefs("pear", "anjou"); initPrefs("fruit", "melon_watermelon"); PrefMigrator.migrate(prefs, KEY_SPLITTER); assertPrefs("melon", "watermelon"); }
public static void migrate(SharedPreferences prefs, Migration... migrations) { for (Migration migration : migrations) { migration.apply(prefs); } }
PrefMigrator { public static void migrate(SharedPreferences prefs, Migration... migrations) { for (Migration migration : migrations) { migration.apply(prefs); } } }
PrefMigrator { public static void migrate(SharedPreferences prefs, Migration... migrations) { for (Migration migration : migrations) { migration.apply(prefs); } } private  PrefMigrator(); }
PrefMigrator { public static void migrate(SharedPreferences prefs, Migration... migrations) { for (Migration migration : migrations) { migration.apply(prefs); } } private  PrefMigrator(); static void migrate(SharedPreferences prefs, Migration... migrations); static void migrateSharedPrefs(); }
PrefMigrator { public static void migrate(SharedPreferences prefs, Migration... migrations) { for (Migration migration : migrations) { migration.apply(prefs); } } private  PrefMigrator(); static void migrate(SharedPreferences prefs, Migration... migrations); static void migrateSharedPrefs();  }