void () { Assume.assumeTrue(key == STRING_KEY); VirtualFile file = createVirtualFile("Foo.java", ""); List<String> values = Arrays.asList("value", "s p a c e s", ",", "", " ", "\t", "null", null); for (String value : values) { STRING_KEY.setPersistentValue(file, value); assertEquals("Should read exactly the same string (read from memory)", value, STRING_KEY.getPersistentValue(file)); memKey.set(file, null); // clear memory data assertFalse("Should not update to the same string: '" + value + "'", STRING_KEY.setPersistentValue(file, value)); assertEquals("Should read exactly the same string (read from memory)", value, STRING_KEY.getPersistentValue(file)); if (!FilePropertyKeyImpl.getREAD_PERSISTENT_VALUE()) continue; memKey.set(file, null); // clear memory data assertEquals("Should read exactly the same string (read from file)", value, STRING_KEY.getPersistentValue(file)); } }