void () { Assume.assumeTrue(FilePropertyKeyImpl.getREAD_PERSISTENT_VALUE()); VirtualFile file = createVirtualFile("Foo.java", ""); TestCase.assertTrue("Write sample1 to file", key.setPersistentValue(file, sample1)); TestCase.assertEquals(sample1, key.getPersistentValue(file)); memKey.set(file, null); // clear memory data TestCase.assertEquals("Should read previous value from file", sample1, key.getPersistentValue(file)); TestCase.assertFalse("Should not update sample1>sample1 value in file", key.setPersistentValue(file, sample1)); TestCase.assertEquals("Should read sample1 from memory (after write)", sample1, key.getPersistentValue(file)); TestCase.assertTrue("Write null to file", key.setPersistentValue(file, null)); TestCase.assertNull(key.getPersistentValue(file)); memKey.set(file, null); // clear memory data TestCase.assertNull("Should read null from file", key.getPersistentValue(file)); }