Buggy code:
private static final String NEW_CHILD_ELEMENT2 = "newChildElement2" ; private static final String NEW_CHILD_ELEMENT1 = "newChildElement1" ; private static final String NEW_TEST_ELEMENT = "newTestElement" ; private static final String TEST1 = "test1" ; private static final String PARENT = "parent" ; private static final String TEST2 = "test2" ; private static final String CLAZZ2 = "clazz" ; private static final String ATTRIBUTE22 = "attribute2" ; private static final String ATTRIBUTE1 = "attribute1" ; private static final String MAX_TU_DIES = "Max<seq2seq4repair_space>tu<seq2seq4repair_space>dies" ; private static final String HELMUT = "Helmut" ; private static final String REFERENCE_TEST_ELEMENT = "referenceTestElement" ; private static final String SECOND_TEST_ELEMENT = "secondTestElement" ; private static final String TEST_ELEMENT = "testElement" ; private static final String PARENT_TEST_ELEMENT = "parentTestElement" ; private static final String LEAF_SECTION = "container" ; private static final String MODEL_ELEMENTS = TestElementFeatures . containedElements ( ) . getName ( ) ; private static final String PARTICIPATING_ACTORS = "nonContained_NToM" ; private static final String PARTICIPATED_USE_CASES = "nonContained_MToN" ; private static final String INITIATING_ACTOR = "nonContained_NTo1" ; private static final String INITIATED_USE_CASES = "nonContained_1ToN" ; @ Test public void createElementTest ( ) throws UnsupportedOperationException , UnsupportedNotificationException { } @ Test public void createElementWithPostCreationObserverTest ( ) throws UnsupportedOperationException , UnsupportedNotificationException { } @ Test public void createElementwithCrossreferencesTest ( ) throws UnsupportedOperationException , UnsupportedNotificationException { } @ Test public void deleteElementTest ( ) throws UnsupportedOperationException , UnsupportedNotificationException { } @ Test public void complexDeleteElementReverseTest ( ) throws IOException , UnsupportedOperationException , UnsupportedNotificationException { } @ Test public void complexCreateTest ( ) throws IOException , UnsupportedOperationException , UnsupportedNotificationException { } @ Test public void deleteWithSingleReferenceChildTest ( ) throws IOException { } public void createWithCrossReferencesTest ( ) throws UnsupportedOperationException , UnsupportedNotificationException { } @ Test public void createInNonProjectContainmentTest ( ) throws IOException { } @ Test public void createEAttributes ( ) throws IOException { } @ Test public void checkPersistentModelElementDeletion ( ) throws IOException { final EClass clazz = eINSTANCE . createEClass ( ) ; clazz . setName ( CreateDeleteOperationTest . CLAZZ2 ) ; final EStructuralFeature attribute = eINSTANCE . createEAttribute ( ) ; final EStructuralFeature attribute2 = eINSTANCE . createEAttribute ( ) ; attribute . setName ( CreateDeleteOperationTest . ATTRIBUTE1 ) ; attribute2 . setName ( CreateDeleteOperationTest . ATTRIBUTE22 ) ; clazz . getEStructuralFeatures ( ) . add ( attribute2 ) ; Add . toProject ( getLocalProject ( ) , attribute ) ; Add . toProject ( getLocalProject ( ) , clazz ) ; assertEquals ( 2 , getProject ( ) . getModelElements ( ) . size ( ) ) ; assertEquals ( attribute , getProject ( ) . getModelElements ( ) . get ( 0 ) ) ; assertEquals ( clazz , getProject ( ) . getModelElements ( ) . get ( 1 ) ) ; assertEquals ( 3 , getProject ( ) . getAllModelElements ( ) . size ( ) ) ; new org . eclipse . emf . emfstore . internal . client . model . util . EMFStoreCommand ( ) { @ Override protected void doRun ( ) { clearOperations ( ) ; } } . run ( false ) ; new org . eclipse . emf . emfstore . internal . client . model . util . EMFStoreCommand ( ) { @ Override protected void doRun ( ) { org . eclipse . emf . ecore . util . EcoreUtil . delete ( attribute ) ; } } . run ( false ) ; final List < AbstractOperation > operations = forceGetOperations ( ) ; assertEquals ( 1 , operations . size ( ) ) ; assertTrue ( ( ( operations . get ( 0 ) ) instanceof CreateDeleteOperation ) ) ; final CreateDeleteOperation operation = ( ( CreateDeleteOperation ) ( operations . get ( 0 ) ) ) ; assertTrue ( operation . isDelete ( ) ) ; assertEquals ( 1 , getProject ( ) . getModelElements ( ) . size ( ) ) ; assertEquals ( clazz , getProject ( ) . getModelElements ( ) . get ( 0 ) ) ; assertEquals ( 2 , getProject ( ) . getAllModelElements ( ) . size ( ) ) ; ( ( org . eclipse . emf . emfstore . internal . client . model . impl . ProjectSpaceImpl ) ( getProjectSpace ( ) ) ) . save ( ) ; final ProjectSpace loadedProjectSpace = ModelUtil . loadEObjectFromResource ( ModelPackage . eINSTANCE . getProjectSpace ( ) , getProjectSpace ( ) . eResource ( ) . getURI ( ) , false ) ; loadedProjectSpace . setResourceSet ( getProjectSpace ( ) . getResourceSet ( ) ) ; <START_BUG> loadedProjectSpace . init ( true ) ; <END_BUG> assertTrue ( ModelUtil . areEqual ( getProjectSpace ( ) . getProject ( ) , loadedProjectSpace . getProject ( ) ) ) ; final Project loadedProject = loadedProjectSpace . getProject ( ) ; assertEquals ( 1 , loadedProject . getModelElements ( ) . size ( ) ) ; assertEquals ( getProject ( ) . getModelElementId ( clazz ) , loadedProject . getModelElementId ( loadedProject . getModelElements ( ) . get ( 0 ) ) ) ; assertEquals ( 2 , loadedProject . getAllModelElements ( ) . size ( ) ) ; } @ Test public void testECoreUtilCopyWithMeetings ( ) { } @ Test public void testCopyProject ( ) { } @ Test public void testCreateWithOneIngoingReference ( ) { } @ Test public void testCreateWithReferencesAndChildrenComplex ( ) { } @ Test public void testClearContainmentTree ( ) { } @ Test public void testClearContainmentTreeReverse ( ) { } @ Test public void testCreateReverse ( ) { } @ Test public void testDeleteReverse ( ) { } @ Test public void testReferenceMapDeletion ( ) { } @ Test public void testAttributeToReferenceMapDeletion ( ) { } @ Test public void testReferenceToAttributeMapDeletion ( ) { } @ Test public void testAttributeMapDeletion ( ) { } @ Test public void testRemoveAndAddElementWithSavedSettingsInOneCommand ( ) { } @ Test public void testRemoveAndAddElementWithSavedButChangedSettingsInOneCommand ( ) { } @ Test public void testRemoveAndAddModelElementWithSavedSettingsInTwoCommands ( ) { } }

Fix:
loadedProjectSpace . init ( ) ;