@Test
public void shouldNotGrantDefaultPermissionsIfExistingProject() {
setupData("shared");
ResourcePermissions permissions = mock(ResourcePermissions.class);
when(permissions.hasRoles(singleProject)).thenReturn(true);
ResourcePersister persister = new DefaultResourcePersister(getSession(), permissions, snapshotCache, resourceCache);
persister.saveProject(singleProject, null);
verify(permissions, never()).grantDefaultRoles(singleProject);