Index: /code/branches/core7/src/libraries/core/class/Identifier.cc
===================================================================
--- /code/branches/core7/src/libraries/core/class/Identifier.cc	(revision 10402)
+++ /code/branches/core7/src/libraries/core/class/Identifier.cc	(revision 10403)
@@ -221,4 +221,17 @@
 
     /**
+     * Resets all information about the class hierarchy. The identifier is considered uninitialized afterwards.
+     */
+    void Identifier::reset()
+    {
+        if (this->factory_ != NULL) // TODO: should reset ALL identifiers, but currently the calls to inheritsFrom<>() are not reproducible
+            this->directParents_.clear();
+        this->parents_.clear();
+        this->directChildren_.clear();
+        this->children_.clear();
+        this->bInitialized_ = false;
+    }
+
+    /**
      * Verifies if the recorded trace of parent identifiers matches the expected trace according to the class hierarchy. If it doesn't match, the class
      * hierarchy is likely wrong, e.g. due to wrong inheritsFrom<>() definitions in abstract classes.
Index: /code/branches/core7/src/libraries/core/class/Identifier.h
===================================================================
--- /code/branches/core7/src/libraries/core/class/Identifier.h	(revision 10402)
+++ /code/branches/core7/src/libraries/core/class/Identifier.h	(revision 10403)
@@ -151,4 +151,5 @@
             void initializeParents(const std::list<const Identifier*>& initializationTrace);
             void finishInitialization();
+            void reset();
 
             bool isA(const Identifier* identifier) const;
Index: /code/branches/core7/src/libraries/core/class/IdentifierManager.cc
===================================================================
--- /code/branches/core7/src/libraries/core/class/IdentifierManager.cc	(revision 10402)
+++ /code/branches/core7/src/libraries/core/class/IdentifierManager.cc	(revision 10403)
@@ -172,15 +172,11 @@
 
     /**
-        @brief Destroys all Identifiers. Called when exiting the program.
-    */
-    void IdentifierManager::destroyAllIdentifiers()
-    {
-        for (std::set<Identifier*>::iterator it = this->identifiers_.begin(); it != this->identifiers_.end(); ++it)
-            delete (*it);
-
-        this->identifiers_.clear();
-        this->identifierByString_.clear();
-        this->identifierByLowercaseString_.clear();
-        this->identifierByNetworkId_.clear();
+     * @brief Resets all Identifiers.
+     */
+    void IdentifierManager::destroyClassHierarchy()
+    {
+        orxout(internal_status) << "Destroy class-hierarchy" << endl;
+        for (std::set<Identifier*>::const_iterator it = this->identifiers_.begin(); it != this->identifiers_.end(); ++it)
+            (*it)->reset();
     }
 
@@ -270,3 +266,17 @@
         this->identifierByNetworkId_.clear();
     }
+
+    /**
+        @brief Destroys all Identifiers. Called when exiting the program.
+    */
+    void IdentifierManager::destroyAllIdentifiers()
+    {
+        for (std::set<Identifier*>::iterator it = this->identifiers_.begin(); it != this->identifiers_.end(); ++it)
+            delete (*it);
+
+        this->identifiers_.clear();
+        this->identifierByString_.clear();
+        this->identifierByLowercaseString_.clear();
+        this->identifierByNetworkId_.clear();
+    }
 }
Index: /code/branches/core7/src/libraries/core/class/IdentifierManager.h
===================================================================
--- /code/branches/core7/src/libraries/core/class/IdentifierManager.h	(revision 10402)
+++ /code/branches/core7/src/libraries/core/class/IdentifierManager.h	(revision 10403)
@@ -60,5 +60,5 @@
             void createClassHierarchy();
             void verifyClassHierarchy();
-            void destroyAllIdentifiers();
+            void destroyClassHierarchy();
 
             void createdObject(Identifiable* identifiable);
@@ -88,4 +88,6 @@
             inline const std::map<uint32_t, Identifier*>& getIdentifierByNetworkIdMap()
                 { return this->identifierByNetworkId_; }
+
+            void destroyAllIdentifiers();
 
         private:
Index: /code/branches/core7/test/core/class/IdentifierClassHierarchyTest.cc
===================================================================
--- /code/branches/core7/test/core/class/IdentifierClassHierarchyTest.cc	(revision 10402)
+++ /code/branches/core7/test/core/class/IdentifierClassHierarchyTest.cc	(revision 10403)
@@ -4,4 +4,5 @@
 #include "core/class/OrxonoxClass.h"
 #include "core/class/OrxonoxInterface.h"
+#include "core/module/ModuleInstance.h"
 
 namespace orxonox
@@ -141,8 +142,13 @@
                 virtual void SetUp()
                 {
+                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances();
+                    ModuleInstance::setCurrentModuleInstance(new ModuleInstance()); // overwrite ModuleInstance because the old one is now loaded and shouln't be used anymore. TODO: better solution?
+                    Identifier::initConfigValues_s = false; // TODO: hack!
+                    IdentifierManager::getInstance().createClassHierarchy();
                 }
 
                 virtual void TearDown()
                 {
+                    IdentifierManager::getInstance().destroyClassHierarchy();
                 }
         };
@@ -159,57 +165,57 @@
     }
 
-//    TEST(IdentifierClassHierarchyTest_NoFixture, NoInitialization)
-//    {
-//        {
-//            Identifier* identifier = Class(BaseInterface1);
-//            EXPECT_EQ(0u, identifier->getChildren().size());
-//            EXPECT_EQ(0u, identifier->getParents().size());
-//        }
-//        {
-//            Identifier* identifier = Class(BaseInterface2);
-//            EXPECT_EQ(0u, identifier->getChildren().size());
-//            EXPECT_EQ(0u, identifier->getParents().size());
-//        }
-//        {
-//            Identifier* identifier = Class(Interface1);
-//            EXPECT_EQ(0u, identifier->getChildren().size());
-//            EXPECT_EQ(0u, identifier->getParents().size());
-//        }
-//        {
-//            Identifier* identifier = Class(Interface2);
-//            EXPECT_EQ(0u, identifier->getChildren().size());
-//            EXPECT_EQ(0u, identifier->getParents().size());
-//        }
-//        {
-//            Identifier* identifier = Class(BaseClass);
-//            EXPECT_EQ(0u, identifier->getChildren().size());
-//            EXPECT_EQ(0u, identifier->getParents().size());
-//        }
-//        {
-//            Identifier* identifier = Class(Class0);
-//            EXPECT_EQ(0u, identifier->getChildren().size());
-//            EXPECT_EQ(0u, identifier->getParents().size());
-//        }
-//        {
-//            Identifier* identifier = Class(Class1);
-//            EXPECT_EQ(0u, identifier->getChildren().size());
-//            EXPECT_EQ(0u, identifier->getParents().size());
-//        }
-//        {
-//            Identifier* identifier = Class(Class2a);
-//            EXPECT_EQ(0u, identifier->getChildren().size());
-//            EXPECT_EQ(0u, identifier->getParents().size());
-//        }
-//        {
-//            Identifier* identifier = Class(Class2b);
-//            EXPECT_EQ(0u, identifier->getChildren().size());
-//            EXPECT_EQ(0u, identifier->getParents().size());
-//        }
-//        {
-//            Identifier* identifier = Class(Class3);
-//            EXPECT_EQ(0u, identifier->getChildren().size());
-//            EXPECT_EQ(0u, identifier->getParents().size());
-//        }
-//    }
+    TEST(IdentifierClassHierarchyTest_NoFixture, NoInitialization)
+    {
+        {
+            Identifier* identifier = Class(BaseInterface1);
+            EXPECT_EQ(0u, identifier->getChildren().size());
+            EXPECT_EQ(0u, identifier->getParents().size());
+        }
+        {
+            Identifier* identifier = Class(BaseInterface2);
+            EXPECT_EQ(0u, identifier->getChildren().size());
+            EXPECT_EQ(0u, identifier->getParents().size());
+        }
+        {
+            Identifier* identifier = Class(Interface1);
+            EXPECT_EQ(0u, identifier->getChildren().size());
+            EXPECT_EQ(0u, identifier->getParents().size());
+        }
+        {
+            Identifier* identifier = Class(Interface2);
+            EXPECT_EQ(0u, identifier->getChildren().size());
+            EXPECT_EQ(0u, identifier->getParents().size());
+        }
+        {
+            Identifier* identifier = Class(BaseClass);
+            EXPECT_EQ(0u, identifier->getChildren().size());
+            EXPECT_EQ(0u, identifier->getParents().size());
+        }
+        {
+            Identifier* identifier = Class(Class0);
+            EXPECT_EQ(0u, identifier->getChildren().size());
+            EXPECT_EQ(0u, identifier->getParents().size());
+        }
+        {
+            Identifier* identifier = Class(Class1);
+            EXPECT_EQ(0u, identifier->getChildren().size());
+            EXPECT_EQ(0u, identifier->getParents().size());
+        }
+        {
+            Identifier* identifier = Class(Class2a);
+            EXPECT_EQ(0u, identifier->getChildren().size());
+            EXPECT_EQ(0u, identifier->getParents().size());
+        }
+        {
+            Identifier* identifier = Class(Class2b);
+            EXPECT_EQ(0u, identifier->getChildren().size());
+            EXPECT_EQ(0u, identifier->getParents().size());
+        }
+        {
+            Identifier* identifier = Class(Class3);
+            EXPECT_EQ(0u, identifier->getChildren().size());
+            EXPECT_EQ(0u, identifier->getParents().size());
+        }
+    }
 
     TEST_F(IdentifierClassHierarchyTest, TestBaseInterface1)
Index: /code/branches/core7/test/core/class/IdentifierExternalClassHierarchyTest.cc
===================================================================
--- /code/branches/core7/test/core/class/IdentifierExternalClassHierarchyTest.cc	(revision 10402)
+++ /code/branches/core7/test/core/class/IdentifierExternalClassHierarchyTest.cc	(revision 10403)
@@ -2,4 +2,5 @@
 #include "core/CoreIncludes.h"
 #include "core/class/Identifiable.h"
+#include "core/module/ModuleInstance.h"
 
 namespace orxonox
@@ -48,8 +49,13 @@
                 virtual void SetUp()
                 {
+                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances();
+                    ModuleInstance::setCurrentModuleInstance(new ModuleInstance()); // overwrite ModuleInstance because the old one is now loaded and shouln't be used anymore. TODO: better solution?
+                    Identifier::initConfigValues_s = false; // TODO: hack!
+                    IdentifierManager::getInstance().createClassHierarchy();
                 }
 
                 virtual void TearDown()
                 {
+                    IdentifierManager::getInstance().destroyClassHierarchy();
                 }
         };
@@ -66,22 +72,22 @@
     }
 
-//    TEST(IdentifierExternalClassHierarchyTest_NoFixture, NoInitialization)
-//    {
-//        {
-//            Identifier* identifier = Class(Interface);
-//            EXPECT_EQ(0u, identifier->getChildren().size());
-//            EXPECT_EQ(0u, identifier->getParents().size());
-//        }
-//        {
-//            Identifier* identifier = Class(BaseClass);
-//            EXPECT_EQ(0u, identifier->getChildren().size());
-//            EXPECT_EQ(0u, identifier->getParents().size());
-//        }
-//        {
-//            Identifier* identifier = Class(RealClass);
-//            EXPECT_EQ(0u, identifier->getChildren().size());
-//            EXPECT_EQ(0u, identifier->getParents().size());
-//        }
-//    }
+    TEST(IdentifierExternalClassHierarchyTest_NoFixture, NoInitialization)
+    {
+        {
+            Identifier* identifier = Class(Interface);
+            EXPECT_EQ(0u, identifier->getChildren().size());
+            EXPECT_EQ(0u, identifier->getParents().size());
+        }
+        {
+            Identifier* identifier = Class(BaseClass);
+            EXPECT_EQ(0u, identifier->getChildren().size());
+            EXPECT_EQ(0u, identifier->getParents().size());
+        }
+        {
+            Identifier* identifier = Class(RealClass);
+            EXPECT_EQ(0u, identifier->getChildren().size());
+            EXPECT_EQ(0u, identifier->getParents().size());
+        }
+    }
 
     TEST_F(IdentifierExternalClassHierarchyTest, TestInterface)
Index: /code/branches/core7/test/core/class/IdentifierNestedClassHierarchyTest.cc
===================================================================
--- /code/branches/core7/test/core/class/IdentifierNestedClassHierarchyTest.cc	(revision 10402)
+++ /code/branches/core7/test/core/class/IdentifierNestedClassHierarchyTest.cc	(revision 10403)
@@ -4,4 +4,5 @@
 #include "core/class/OrxonoxClass.h"
 #include "core/class/OrxonoxInterface.h"
+#include "core/module/ModuleInstance.h"
 
 namespace orxonox
@@ -108,8 +109,13 @@
                 virtual void SetUp()
                 {
+                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances();
+                    ModuleInstance::setCurrentModuleInstance(new ModuleInstance()); // overwrite ModuleInstance because the old one is now loaded and shouln't be used anymore. TODO: better solution?
+                    Identifier::initConfigValues_s = false; // TODO: hack!
+                    IdentifierManager::getInstance().createClassHierarchy();
                 }
 
                 virtual void TearDown()
                 {
+                    IdentifierManager::getInstance().destroyClassHierarchy();
                 }
         };
Index: /code/branches/core7/test/core/class/IdentifierSimpleClassHierarchyTest.cc
===================================================================
--- /code/branches/core7/test/core/class/IdentifierSimpleClassHierarchyTest.cc	(revision 10402)
+++ /code/branches/core7/test/core/class/IdentifierSimpleClassHierarchyTest.cc	(revision 10403)
@@ -4,4 +4,5 @@
 #include "core/class/OrxonoxClass.h"
 #include "core/class/OrxonoxInterface.h"
+#include "core/module/ModuleInstance.h"
 
 namespace orxonox
@@ -50,8 +51,13 @@
                 virtual void SetUp()
                 {
+                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances();
+                    ModuleInstance::setCurrentModuleInstance(new ModuleInstance()); // overwrite ModuleInstance because the old one is now loaded and shouln't be used anymore. TODO: better solution?
+                    Identifier::initConfigValues_s = false; // TODO: hack!
+                    IdentifierManager::getInstance().createClassHierarchy();
                 }
 
                 virtual void TearDown()
                 {
+                    IdentifierManager::getInstance().destroyClassHierarchy();
                 }
         };
@@ -68,22 +74,22 @@
     }
 
-//    TEST(IdentifierSimpleClassHierarchyTest_NoFixture, NoInitialization)
-//    {
-//        {
-//            Identifier* identifier = Class(Interface);
-//            EXPECT_EQ(0u, identifier->getChildren().size());
-//            EXPECT_EQ(0u, identifier->getParents().size());
-//        }
-//        {
-//            Identifier* identifier = Class(BaseClass);
-//            EXPECT_EQ(0u, identifier->getChildren().size());
-//            EXPECT_EQ(0u, identifier->getParents().size());
-//        }
-//        {
-//            Identifier* identifier = Class(RealClass);
-//            EXPECT_EQ(0u, identifier->getChildren().size());
-//            EXPECT_EQ(0u, identifier->getParents().size());
-//        }
-//    }
+    TEST(IdentifierSimpleClassHierarchyTest_NoFixture, NoInitialization)
+    {
+        {
+            Identifier* identifier = Class(Interface);
+            EXPECT_EQ(0u, identifier->getChildren().size());
+            EXPECT_EQ(0u, identifier->getParents().size());
+        }
+        {
+            Identifier* identifier = Class(BaseClass);
+            EXPECT_EQ(0u, identifier->getChildren().size());
+            EXPECT_EQ(0u, identifier->getParents().size());
+        }
+        {
+            Identifier* identifier = Class(RealClass);
+            EXPECT_EQ(0u, identifier->getChildren().size());
+            EXPECT_EQ(0u, identifier->getParents().size());
+        }
+    }
 
     TEST_F(IdentifierSimpleClassHierarchyTest, TestInterface)
Index: /code/branches/core7/test/core/class/SubclassIdentifierTest.cc
===================================================================
--- /code/branches/core7/test/core/class/SubclassIdentifierTest.cc	(revision 10402)
+++ /code/branches/core7/test/core/class/SubclassIdentifierTest.cc	(revision 10403)
@@ -4,4 +4,5 @@
 #include "core/class/SubclassIdentifier.h"
 #include "core/class/OrxonoxClass.h"
+#include "core/module/ModuleInstance.h"
 
 namespace orxonox
@@ -30,4 +31,9 @@
                 virtual void SetUp()
                 {
+                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances();
+                    ModuleInstance::setCurrentModuleInstance(new ModuleInstance()); // overwrite ModuleInstance because the old one is now loaded and shouln't be used anymore. TODO: better solution?
+                    Identifier::initConfigValues_s = false; // TODO: hack!
+                    IdentifierManager::getInstance().createClassHierarchy();
+
                     Context::setRootContext(new Context(NULL));
                 }
@@ -36,4 +42,6 @@
                 {
                     Context::setRootContext(NULL);
+
+                    IdentifierManager::getInstance().destroyClassHierarchy();
                 }
         };
Index: /code/branches/core7/test/core/class/SuperTest.cc
===================================================================
--- /code/branches/core7/test/core/class/SuperTest.cc	(revision 10402)
+++ /code/branches/core7/test/core/class/SuperTest.cc	(revision 10403)
@@ -5,4 +5,5 @@
 #include "core/BaseObject.h"
 #include "core/class/Super.h"
+#include "core/module/ModuleInstance.h"
 
 namespace orxonox
@@ -65,5 +66,5 @@
         RegisterClass(TestSubclass);
 
-       // Fixture
+        // Fixture
         class SuperTest : public ::testing::Test
         {
@@ -71,4 +72,9 @@
                 virtual void SetUp()
                 {
+                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances();
+                    ModuleInstance::setCurrentModuleInstance(new ModuleInstance()); // overwrite ModuleInstance because the old one is now loaded and shouln't be used anymore. TODO: better solution?
+                    Identifier::initConfigValues_s = false; // TODO: hack!
+                    IdentifierManager::getInstance().createClassHierarchy();
+
                     Context::setRootContext(new Context(NULL));
                 }
@@ -77,4 +83,6 @@
                 {
                     Context::setRootContext(NULL);
+
+                    IdentifierManager::getInstance().destroyClassHierarchy();
                 }
         };
Index: /code/branches/core7/test/core/command/CommandTest.cc
===================================================================
--- /code/branches/core7/test/core/command/CommandTest.cc	(revision 10402)
+++ /code/branches/core7/test/core/command/CommandTest.cc	(revision 10403)
@@ -133,4 +133,22 @@
                 ModifyConsoleCommand("test").popFunction();
         }
+
+        // Fixture
+        class CommandTest : public ::testing::Test
+        {
+            public:
+                virtual void SetUp()
+                {
+                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances();
+                    ModuleInstance::setCurrentModuleInstance(new ModuleInstance()); // overwrite ModuleInstance because the old one is now loaded and shouln't be used anymore. TODO: better solution?
+                    Identifier::initConfigValues_s = false; // TODO: hack!
+                    IdentifierManager::getInstance().createClassHierarchy();
+                }
+
+                virtual void TearDown()
+                {
+                    IdentifierManager::getInstance().destroyClassHierarchy();
+                }
+        };
     }
 
@@ -142,10 +160,6 @@
     }
 
-    TEST(CommandTest, ModuleTest)
+    TEST_F(CommandTest, ModuleTest)
     {
-        ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances();
-        Identifier::initConfigValues_s = false; // TODO: hack!
-        IdentifierManager::getInstance().createClassHierarchy();
-
         test(0, 0, 0);
         CommandExecutor::execute("test 0", false);
