ViewModelCache { int getSpareKey(@NonNull Context context) { return getFragment(context).getSpareKey(); }  MvvmViewModel getViewModel(int key, @NonNull Context context); void putViewModel(int key, MvvmViewModel cacheViewModel, Context context); void removeViewModel(int key, Context context); void cleanUp();  }
@Test public void testKeysUnique() { final int firstKey = cache.getSpareKey(testActivity); final int secondKey = cache.getSpareKey(testActivity); final int thirdKey = cache.getSpareKey(testActivity); assertNotEquals(firstKey, secondKey); assertNotEquals(firstKey, thirdKey); assertNotEquals(secondKey, thirdKey); }