VirtualFileGist<Integer> () { final String gistId = getTestName(true) + ".calculationsCount"; IntRef invocationsHolder = new IntRef(0); return GistManager.getInstance().newVirtualFileGist( gistId, 0, EnumeratorIntegerDescriptor.INSTANCE, (p, f) -> { invocationsHolder.inc(); return invocationsHolder.get(); } ); }