Memento state = new Memento();
state.setValue(DefaultResourceModel.MEMENTO_AUTOMATIC_RESOURCES, 0);
state.setValue(DefaultResourceModel.MEMENTO_RESOURCE_SET_COUNT, 0);
ResourceSetAccessor accessor = mock(ResourceSetAccessor.class);
when(accessor.getResourceSet(0)).thenReturn(ResourceSetTestUtils.createResources(1));
when(accessor.getResourceSet(1)).thenReturn(ResourceSetTestUtils.createResources());
underTest.restore(state, restorationManager, accessor);
assertEquals(true, underTest.getResources().contains(ResourceSetTestUtils.createResource(1)));
}