@SuppressWarnings("unchecked")
st
public void getCache_doesNotExistYet_handlePersistenceException() throws PersistenceException {

    disableResolution(parentCache);
    when(resourceResolver.create(any(), any(), any())).thenThrow(PersistenceException.class);
    final Resource cache = model.getCache(resourceResolver, parent);
    assertNull(cache);
    verifyCommits(1);
    assertTrue(buildCacheCalled.isEmpty());
}