void () { VirtualFile file = createVirtualFile("Foo.java", ""); TestCase.assertNull("Initial value is null", key.getPersistentValue(file)); TestCase.assertTrue("Write something not-null", key.setPersistentValue(file, sample1)); TestCase.assertEquals(sample1, key.getPersistentValue(file)); TestCase.assertTrue("Write null, should change previous value", key.setPersistentValue(file, null)); TestCase.assertFalse("Second set should not change existing value", key.setPersistentValue(file, null)); TestCase.assertNull("We still can read null", key.getPersistentValue(file)); }