@Test
public void testCacheInitializationError() throws IOException {

  // Creating a file where the cache should be will cause an error during initialization.
  assertThat(cacheDir.createNewFile()).isTrue();
  // Cache initialization should not throw an exception, but no UID will be generated.
  SimpleCache cache = getSimpleCache();
  long uid = cache.getUid();
  assertThat(uid).isEqualTo(-1L);
}