void () { IntRef invocationsHolder = new IntRef(0); VirtualFileGist<String> gist = GistManager.getInstance().newVirtualFileGist(getTestName(true), 0, EnumeratorStringDescriptor.INSTANCE, (p, f) -> { invocationsHolder.inc(); return null; }); VirtualFile file = fileWithContent("a.txt", "foo bar"); assertNull(gist.getFileData(getProject(), file)); assertNull(gist.getFileData(getProject(), file)); assertEquals(1, invocationsHolder.get()); }