setupData("shared");
DefaultResourcePersister persister = new DefaultResourcePersister(getSession(), mock(ResourcePermissions.class), snapshotCache, resourceCache);
persister.saveProject(multiModuleProject, null);
persister.saveProject(moduleA, multiModuleProject);
persister.saveResource(moduleA, new Directory("org/foo").setEffectiveKey("a:org/foo"));
persister.saveResource(moduleA, new File("org/foo/MyClass.java").setEffectiveKey("a:org/foo/MyClass.java"));
persister.clear();
assertThat(persister.getSnapshotsByResource().size(), is(2));
assertThat(persister.getSnapshotsByResource().get(multiModuleProject), notNullValue());