Index: code/trunk/test/core/CMakeLists.txt
===================================================================
--- code/trunk/test/core/CMakeLists.txt	(revision 11052)
+++ code/trunk/test/core/CMakeLists.txt	(revision 11071)
@@ -19,4 +19,7 @@
     class/SuperTest.cc
     command/CommandTest.cc
+    command/FunctorPtrTest.cc
+    command/FunctorTest.cc
+    command/ExecutorPtrTest.cc
     object/ClassFactoryTest.cc
     object/ContextTest.cc
@@ -25,4 +28,5 @@
     object/ListableTest.cc
     object/ObjectListBaseTest.cc
+    object/ObjectListTest.cc
     object/ObjectListIteratorTest.cc
     object/StrongPtrTest.cc
Index: code/trunk/test/core/class/IdentifiableTest.cc
===================================================================
--- code/trunk/test/core/class/IdentifiableTest.cc	(revision 11052)
+++ code/trunk/test/core/class/IdentifiableTest.cc	(revision 11071)
@@ -20,5 +20,5 @@
         {
             public:
-                virtual void SetUp()
+                virtual void SetUp() override
                 {
                     new IdentifierManager();
@@ -26,5 +26,5 @@
                 }
 
-                virtual void TearDown()
+                virtual void TearDown() override
                 {
                     ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
@@ -37,5 +37,5 @@
     {
         IdentifiableClass* test = new IdentifiableClass();
-        ASSERT_TRUE(test != NULL);
+        ASSERT_TRUE(test != nullptr);
         delete test;
     }
Index: code/trunk/test/core/class/IdentifierClassHierarchyTest.cc
===================================================================
--- code/trunk/test/core/class/IdentifierClassHierarchyTest.cc	(revision 11052)
+++ code/trunk/test/core/class/IdentifierClassHierarchyTest.cc	(revision 11071)
@@ -86,5 +86,5 @@
                 }
 
-                virtual void test1() {}
+                virtual void test1() override {}
         };
 
@@ -97,6 +97,6 @@
                 }
 
-                virtual void test1() {}
-                virtual void test2() {}
+                virtual void test1() override {}
+                virtual void test2() override {}
         };
 
@@ -109,6 +109,6 @@
                 }
 
-                virtual void test1() {}
-                virtual void test2() {}
+                virtual void test1() override {}
+                virtual void test2() override {}
         };
 
@@ -121,6 +121,6 @@
                 }
 
-                virtual void test1() {}
-                virtual void test2() {}
+                virtual void test1() override {}
+                virtual void test2() override {}
         };
 
@@ -140,14 +140,14 @@
         {
             public:
-                virtual void SetUp()
+                virtual void SetUp() override
                 {
                     new IdentifierManager();
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
-                    Context::setRootContext(new Context(NULL));
+                    Context::setRootContext(new Context(nullptr));
                     Identifier::initConfigValues_s = false; // TODO: hack!
                     IdentifierManager::getInstance().createClassHierarchy();
                 }
 
-                virtual void TearDown()
+                virtual void TearDown() override
                 {
                     IdentifierManager::getInstance().destroyClassHierarchy();
Index: code/trunk/test/core/class/IdentifierExternalClassHierarchyTest.cc
===================================================================
--- code/trunk/test/core/class/IdentifierExternalClassHierarchyTest.cc	(revision 11052)
+++ code/trunk/test/core/class/IdentifierExternalClassHierarchyTest.cc	(revision 11071)
@@ -36,5 +36,5 @@
                 }
 
-                virtual void test() {}
+                virtual void test() override {}
         };
 
@@ -47,14 +47,14 @@
         {
             public:
-                virtual void SetUp()
+                virtual void SetUp() override
                 {
                     new IdentifierManager();
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
-                    Context::setRootContext(new Context(NULL));
+                    Context::setRootContext(new Context(nullptr));
                     Identifier::initConfigValues_s = false; // TODO: hack!
                     IdentifierManager::getInstance().createClassHierarchy();
                 }
 
-                virtual void TearDown()
+                virtual void TearDown() override
                 {
                     IdentifierManager::getInstance().destroyClassHierarchy();
Index: code/trunk/test/core/class/IdentifierNestedClassHierarchyTest.cc
===================================================================
--- code/trunk/test/core/class/IdentifierNestedClassHierarchyTest.cc	(revision 11052)
+++ code/trunk/test/core/class/IdentifierNestedClassHierarchyTest.cc	(revision 11071)
@@ -107,14 +107,14 @@
         {
             public:
-                virtual void SetUp()
+                virtual void SetUp() override
                 {
                     new IdentifierManager();
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
-                    Context::setRootContext(new Context(NULL));
+                    Context::setRootContext(new Context(nullptr));
                     Identifier::initConfigValues_s = false; // TODO: hack!
                     IdentifierManager::getInstance().createClassHierarchy();
                 }
 
-                virtual void TearDown()
+                virtual void TearDown() override
                 {
                     IdentifierManager::getInstance().destroyClassHierarchy();
Index: code/trunk/test/core/class/IdentifierSimpleClassHierarchyTest.cc
===================================================================
--- code/trunk/test/core/class/IdentifierSimpleClassHierarchyTest.cc	(revision 11052)
+++ code/trunk/test/core/class/IdentifierSimpleClassHierarchyTest.cc	(revision 11071)
@@ -38,5 +38,5 @@
                 }
 
-                virtual void test() {}
+                virtual void test() override {}
         };
 
@@ -49,14 +49,14 @@
         {
             public:
-                virtual void SetUp()
+                virtual void SetUp() override
                 {
                     new IdentifierManager();
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
-                    Context::setRootContext(new Context(NULL));
+                    Context::setRootContext(new Context(nullptr));
                     Identifier::initConfigValues_s = false; // TODO: hack!
                     IdentifierManager::getInstance().createClassHierarchy();
                 }
 
-                virtual void TearDown()
+                virtual void TearDown() override
                 {
                     IdentifierManager::getInstance().destroyClassHierarchy();
Index: code/trunk/test/core/class/IdentifierTest.cc
===================================================================
--- code/trunk/test/core/class/IdentifierTest.cc	(revision 11052)
+++ code/trunk/test/core/class/IdentifierTest.cc	(revision 11071)
@@ -27,5 +27,5 @@
         {
             public:
-                virtual void SetUp()
+                virtual void SetUp() override
                 {
                     new IdentifierManager();
@@ -33,5 +33,5 @@
                 }
 
-                virtual void TearDown()
+                virtual void TearDown() override
                 {
                     ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
@@ -46,5 +46,5 @@
 
         Identifier* identifier = Class(TestClass);
-        EXPECT_TRUE(identifier != NULL);
+        EXPECT_TRUE(identifier != nullptr);
     }
 
@@ -54,5 +54,5 @@
 
         Identifier* identifier = Class(TestSubclass);
-        EXPECT_TRUE(identifier != NULL);
+        EXPECT_TRUE(identifier != nullptr);
     }
 
Index: code/trunk/test/core/class/OrxonoxClassTest.cc
===================================================================
--- code/trunk/test/core/class/OrxonoxClassTest.cc	(revision 11052)
+++ code/trunk/test/core/class/OrxonoxClassTest.cc	(revision 11071)
@@ -16,11 +16,11 @@
         {
             public:
-                virtual void SetUp()
+                virtual void SetUp() override
                 {
                     new IdentifierManager();
-                    Context::setRootContext(new Context(NULL));
+                    Context::setRootContext(new Context(nullptr));
                 }
 
-                virtual void TearDown()
+                virtual void TearDown() override
                 {
                     Context::destroyRootContext();
@@ -33,5 +33,5 @@
     {
         TestClass* test = new TestClass();
-        ASSERT_TRUE(test != NULL);
+        ASSERT_TRUE(test != nullptr);
         delete test;
     }
Index: code/trunk/test/core/class/OrxonoxInterfaceTest.cc
===================================================================
--- code/trunk/test/core/class/OrxonoxInterfaceTest.cc	(revision 11052)
+++ code/trunk/test/core/class/OrxonoxInterfaceTest.cc	(revision 11071)
@@ -31,11 +31,11 @@
         {
             public:
-                virtual void SetUp()
+                virtual void SetUp() override
                 {
                     new IdentifierManager();
-                    Context::setRootContext(new Context(NULL));
+                    Context::setRootContext(new Context(nullptr));
                 }
 
-                virtual void TearDown()
+                virtual void TearDown() override
                 {
                     Context::destroyRootContext();
@@ -48,5 +48,5 @@
     {
         TestClass1* test = new TestClass1();
-        ASSERT_TRUE(test != NULL);
+        ASSERT_TRUE(test != nullptr);
         delete test;
     }
@@ -55,5 +55,5 @@
     {
         TestClass2* test = new TestClass2();
-        ASSERT_TRUE(test != NULL);
+        ASSERT_TRUE(test != nullptr);
         delete test;
     }
Index: code/trunk/test/core/class/SubclassIdentifierTest.cc
===================================================================
--- code/trunk/test/core/class/SubclassIdentifierTest.cc	(revision 11052)
+++ code/trunk/test/core/class/SubclassIdentifierTest.cc	(revision 11071)
@@ -13,5 +13,5 @@
         {
             public:
-                TestClass(Context* context = NULL) { RegisterObject(TestClass); }
+                TestClass(Context* context = nullptr) { RegisterObject(TestClass); }
         };
 
@@ -19,5 +19,5 @@
         {
             public:
-                TestSubclass(Context* context = NULL) { RegisterObject(TestSubclass); }
+                TestSubclass(Context* context = nullptr) { RegisterObject(TestSubclass); }
         };
 
@@ -29,14 +29,14 @@
         {
             public:
-                virtual void SetUp()
+                virtual void SetUp() override
                 {
                     new IdentifierManager();
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
-                    Context::setRootContext(new Context(NULL));
+                    Context::setRootContext(new Context(nullptr));
                     Identifier::initConfigValues_s = false; // TODO: hack!
                     IdentifierManager::getInstance().createClassHierarchy();
                 }
 
-                virtual void TearDown()
+                virtual void TearDown() override
                 {
                     IdentifierManager::getInstance().destroyClassHierarchy();
@@ -77,6 +77,6 @@
         subclassIdentifier = Class(TestSubclass);
 
-        TestClass* instance = subclassIdentifier.fabricate(NULL);
-        ASSERT_TRUE(instance != NULL);
+        TestClass* instance = subclassIdentifier.fabricate(nullptr);
+        ASSERT_TRUE(instance != nullptr);
         EXPECT_EQ(Class(TestSubclass), instance->getIdentifier());
         delete instance;
Index: code/trunk/test/core/class/SuperTest.cc
===================================================================
--- code/trunk/test/core/class/SuperTest.cc	(revision 11052)
+++ code/trunk/test/core/class/SuperTest.cc	(revision 11071)
@@ -14,15 +14,15 @@
         {
             public:
-                TestClass(Context* context = NULL) : BaseObject(context), changedNameBase_(false), xmlPortBase_(false), modeBase_(XMLPort::NOP)
+                TestClass(Context* context = nullptr) : BaseObject(context), changedNameBase_(false), xmlPortBase_(false), modeBase_(XMLPort::NOP)
                 {
                     RegisterObject(TestClass);
                 }
 
-                virtual void changedName()
+                virtual void changedName() override
                 {
                     this->changedNameBase_ = true;
                 }
 
-                virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode)
+                virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override
                 {
                     this->xmlPortBase_ = true;
@@ -38,10 +38,10 @@
         {
             public:
-                TestSubclass(Context* context = NULL) : TestClass(context), changedNameSubclass_(false), xmlPortSubclass_(false), modeSubclass_(XMLPort::NOP)
+                TestSubclass(Context* context = nullptr) : TestClass(context), changedNameSubclass_(false), xmlPortSubclass_(false), modeSubclass_(XMLPort::NOP)
                 {
                     RegisterObject(TestSubclass);
                 }
 
-                virtual void changedName()
+                virtual void changedName() override
                 {
                     this->changedNameSubclass_ = true;
@@ -50,5 +50,5 @@
                 }
 
-                virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode)
+                virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override
                 {
                     this->xmlPortSubclass_ = true;
@@ -70,14 +70,14 @@
         {
             public:
-                virtual void SetUp()
+                virtual void SetUp() override
                 {
                     new IdentifierManager();
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
-                    Context::setRootContext(new Context(NULL));
+                    Context::setRootContext(new Context(nullptr));
                     Identifier::initConfigValues_s = false; // TODO: hack!
                     IdentifierManager::getInstance().createClassHierarchy();
                 }
 
-                virtual void TearDown()
+                virtual void TearDown() override
                 {
                     IdentifierManager::getInstance().destroyClassHierarchy();
@@ -132,5 +132,5 @@
         EXPECT_EQ(XMLPort::NOP, test.modeSubclass_);
 
-        Element* element = NULL;
+        Element* element = nullptr;
         test.XMLPort(*element, XMLPort::SaveObject);
 
Index: code/trunk/test/core/command/CommandTest.cc
===================================================================
--- code/trunk/test/core/command/CommandTest.cc	(revision 11052)
+++ code/trunk/test/core/command/CommandTest.cc	(revision 11071)
@@ -129,5 +129,5 @@
                 ModifyConsoleCommand("test").popObject();
             else if (a == 1)
-                ModifyConsoleCommand("test").setFunction(FunctorPtr(0));
+                ModifyConsoleCommand("test").setFunction(FunctorPtr(nullptr));
             else if (a == -1)
                 ModifyConsoleCommand("test").popFunction();
@@ -138,15 +138,15 @@
         {
             public:
-                virtual void SetUp()
+                virtual void SetUp() override
                 {
                     new IdentifierManager();
                     new ConsoleCommandManager();
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::CONSOLE_COMMAND);
-                    Context::setRootContext(new Context(NULL));
+                    Context::setRootContext(new Context(nullptr));
                     Identifier::initConfigValues_s = false; // TODO: hack!
                     IdentifierManager::getInstance().createClassHierarchy();
                 }
 
-                virtual void TearDown()
+                virtual void TearDown() override
                 {
                     IdentifierManager::getInstance().destroyClassHierarchy();
Index: code/trunk/test/core/command/ExecutorPtrTest.cc
===================================================================
--- code/trunk/test/core/command/ExecutorPtrTest.cc	(revision 11071)
+++ code/trunk/test/core/command/ExecutorPtrTest.cc	(revision 11071)
@@ -0,0 +1,84 @@
+#include <gtest/gtest.h>
+#include "core/command/Executor.h"
+
+namespace orxonox
+{
+    namespace
+    {
+        class Testclass : public Destroyable
+        {
+            public:
+                void testMember() {}
+                static void testStatic() {}
+        };
+
+        class Subclass : public Testclass
+        {
+        };
+
+        // Fixture
+        class ExecutorPtrTest : public ::testing::Test
+        {
+            public:
+                virtual void SetUp() override
+                {
+                }
+
+                virtual void TearDown() override
+                {
+                }
+        };
+    }
+
+    TEST_F(ExecutorPtrTest, emptyPtr)
+    {
+        ExecutorMemberPtr<Testclass> ptr1;
+        ExecutorStaticPtr ptr2;
+        ExecutorPtr ptr3;
+
+        ASSERT_FALSE(static_cast<bool>(ptr1));
+        ASSERT_FALSE(static_cast<bool>(ptr2));
+        ASSERT_FALSE(static_cast<bool>(ptr3));
+    }
+
+    TEST_F(ExecutorPtrTest, canAssignToExecutorMemberPtr)
+    {
+        ExecutorMemberPtr<Testclass> ptr = createExecutor(createFunctor(&Testclass::testMember));
+        ASSERT_TRUE(static_cast<bool>(ptr));
+    }
+
+    TEST_F(ExecutorPtrTest, canAssignToExecutorStaticPtr)
+    {
+        ExecutorStaticPtr ptr = createExecutor(createFunctor(&Testclass::testStatic));
+        ASSERT_TRUE(static_cast<bool>(ptr));
+    }
+
+    TEST_F(ExecutorPtrTest, canAssignToExecutorPtr)
+    {
+        ExecutorPtr ptr1 = createExecutor(createFunctor(&Testclass::testMember));
+        ASSERT_TRUE(static_cast<bool>(ptr1));
+        ExecutorPtr ptr2 = createExecutor(createFunctor(&Testclass::testStatic));
+        ASSERT_TRUE(static_cast<bool>(ptr2));
+    }
+
+    TEST_F(ExecutorPtrTest, canCastFromExecutorMemberPtr)
+    {
+        ExecutorMemberPtr<Testclass> ptr1 = createExecutor(createFunctor(&Testclass::testMember));
+        ExecutorPtr ptr2 = ptr1;
+        ASSERT_TRUE(static_cast<bool>(ptr2));
+    }
+
+    TEST_F(ExecutorPtrTest, canCastFromExecutorStaticPtr)
+    {
+        ExecutorStaticPtr ptr1 = createExecutor(createFunctor(&Testclass::testStatic));
+        ExecutorPtr ptr2 = ptr1;
+        ASSERT_TRUE(static_cast<bool>(ptr2));
+    }
+
+    TEST_F(ExecutorPtrTest, canCastToExecutorMemberOfSubclass)
+    {
+        ExecutorPtr ptr1 = createExecutor(createFunctor(&Subclass::testMember));
+        ExecutorMemberPtr<Subclass> ptr2 = std::static_pointer_cast<ExecutorMember<Subclass>>(ptr1);
+        ASSERT_TRUE(static_cast<bool>(ptr2));
+    }
+}
Index: code/trunk/test/core/command/FunctorPtrTest.cc
===================================================================
--- code/trunk/test/core/command/FunctorPtrTest.cc	(revision 11071)
+++ code/trunk/test/core/command/FunctorPtrTest.cc	(revision 11071)
@@ -0,0 +1,84 @@
+#include <gtest/gtest.h>
+#include "core/command/Functor.h"
+
+namespace orxonox
+{
+    namespace
+    {
+        class Testclass : public Destroyable
+        {
+            public:
+                void testMember() {}
+                static void testStatic() {}
+        };
+
+        class Subclass : public Testclass
+        {
+        };
+
+        // Fixture
+        class FunctorPtrTest : public ::testing::Test
+        {
+            public:
+                virtual void SetUp() override
+                {
+                }
+
+                virtual void TearDown() override
+                {
+                }
+        };
+    }
+
+    TEST_F(FunctorPtrTest, emptyPtr)
+    {
+        FunctorMemberPtr<Testclass> ptr1;
+        FunctorStaticPtr ptr2;
+        FunctorPtr ptr3;
+
+        ASSERT_FALSE(static_cast<bool>(ptr1));
+        ASSERT_FALSE(static_cast<bool>(ptr2));
+        ASSERT_FALSE(static_cast<bool>(ptr3));
+    }
+
+    TEST_F(FunctorPtrTest, canAssignToFunctorMemberPtr)
+    {
+        FunctorMemberPtr<Testclass> ptr = createFunctor(&Testclass::testMember);
+        ASSERT_TRUE(static_cast<bool>(ptr));
+    }
+
+    TEST_F(FunctorPtrTest, canAssignToFunctorStaticPtr)
+    {
+        FunctorStaticPtr ptr = createFunctor(&Testclass::testStatic);
+        ASSERT_TRUE(static_cast<bool>(ptr));
+    }
+
+    TEST_F(FunctorPtrTest, canAssignToFunctorPtr)
+    {
+        FunctorPtr ptr1 = createFunctor(&Testclass::testMember);
+        ASSERT_TRUE(static_cast<bool>(ptr1));
+        FunctorPtr ptr2 = createFunctor(&Testclass::testStatic);
+        ASSERT_TRUE(static_cast<bool>(ptr2));
+    }
+
+    TEST_F(FunctorPtrTest, canCastFromFunctorMemberPtr)
+    {
+        FunctorMemberPtr<Testclass> ptr1 = createFunctor(&Testclass::testMember);
+        FunctorPtr ptr2 = ptr1;
+        ASSERT_TRUE(static_cast<bool>(ptr2));
+    }
+
+    TEST_F(FunctorPtrTest, canCastFromFunctorStaticPtr)
+    {
+        FunctorStaticPtr ptr1 = createFunctor(&Testclass::testStatic);
+        FunctorPtr ptr2 = ptr1;
+        ASSERT_TRUE(static_cast<bool>(ptr2));
+    }
+
+    TEST_F(FunctorPtrTest, canCastToFunctorMemberOfSubclass)
+    {
+        FunctorPtr ptr1 = createFunctor(&Subclass::testMember);
+        FunctorMemberPtr<Subclass> ptr2 = std::static_pointer_cast<FunctorMember<Subclass>>(ptr1);
+        ASSERT_TRUE(static_cast<bool>(ptr2));
+    }
+}
Index: code/trunk/test/core/command/FunctorTest.cc
===================================================================
--- code/trunk/test/core/command/FunctorTest.cc	(revision 11071)
+++ code/trunk/test/core/command/FunctorTest.cc	(revision 11071)
@@ -0,0 +1,832 @@
+#include <gtest/gtest.h>
+#include <gmock/gmock.h>
+#include <functional>
+#include "core/command/Functor.h"
+
+namespace orxonox
+{
+    namespace
+    {
+        // Fixture
+        class FunctorTest : public ::testing::Test
+        {
+            public:
+                virtual void SetUp() override
+                {
+                }
+
+                virtual void TearDown() override
+                {
+                }
+        };
+
+        class DestroyableClass : public Destroyable
+        {
+            public:
+                virtual void        method0() { return; }
+                virtual int         method1(int arg1) { return arg1; }
+                virtual float       method2(int arg1, float arg2) { return arg2; }
+                virtual bool        method3(int arg1, float arg2, bool arg3) { return arg3; }
+                virtual std::string method4(int arg1, float arg2, bool arg3, const std::string& arg4) { return arg4; }
+                virtual Vector3     method5(int arg1, float arg2, bool arg3, const std::string& arg4, const Vector3& arg5) { return arg5; }
+
+                static void        staticmethod0()
+                    { return staticinstance->method0(); }
+                static int         staticmethod1(int arg1)
+                    { return staticinstance->method1(arg1); }
+                static float       staticmethod2(int arg1, float arg2)
+                    { return staticinstance->method2(arg1, arg2); }
+                static bool        staticmethod3(int arg1, float arg2, bool arg3)
+                    { return staticinstance->method3(arg1, arg2, arg3); }
+                static std::string staticmethod4(int arg1, float arg2, bool arg3, const std::string& arg4)
+                    { return staticinstance->method4(arg1, arg2, arg3, arg4); }
+                static Vector3     staticmethod5(int arg1, float arg2, bool arg3, const std::string& arg4, const Vector3& arg5)
+                    { return staticinstance->method5(arg1, arg2, arg3, arg4, arg5); }
+
+                static DestroyableClass* staticinstance;
+        };
+
+        DestroyableClass* DestroyableClass::staticinstance = nullptr;
+
+        class MockDestroyableClass : public DestroyableClass
+        {
+            public:
+                MOCK_METHOD0(method0, void());
+                MOCK_METHOD1(method1, int(int));
+                MOCK_METHOD2(method2, float(int, float));
+                MOCK_METHOD3(method3, bool(int, float, bool));
+                MOCK_METHOD4(method4, std::string(int, float, bool, const std::string&));
+                MOCK_METHOD5(method5, Vector3(int, float, bool, const std::string&, const Vector3&));
+        };
+
+        class NonDestroyableClass
+        {
+            public:
+                void method() {}
+        };
+
+        void f1(int, double) {}
+        void f2(int, double, double) {}
+        int f3(int, double, double) { return 0; }
+        int f4a(int arg) { return arg*2; }
+        int f4b(int arg) { return arg*3; }
+        int multiply(int a, int b) { return a*b; }
+
+        struct CallableStruct
+        {
+            public:
+                int operator()()
+                {
+                    return 1;
+                }
+        };
+    }
+
+
+    ///////////////////////////////////////////////////////////////
+    ////////////////////// Functor (general) //////////////////////
+    ///////////////////////////////////////////////////////////////
+
+    TEST_F(FunctorTest, HasCorrectType)
+    {
+        FunctorMemberPtr<DestroyableClass> functor1 = createFunctor(&DestroyableClass::method0);
+        FunctorStaticPtr functor2 = createFunctor(&DestroyableClass::staticmethod0);
+        EXPECT_EQ(Functor::Type::Member, functor1->getType());
+        EXPECT_EQ(Functor::Type::Static, functor2->getType());
+    }
+
+    TEST_F(FunctorTest, ReturnsCorrectParamCount)
+    {
+        EXPECT_EQ(0, createFunctor(&DestroyableClass::method0)->getParamCount());
+        EXPECT_EQ(1, createFunctor(&DestroyableClass::method1)->getParamCount());
+        EXPECT_EQ(2, createFunctor(&DestroyableClass::method2)->getParamCount());
+        EXPECT_EQ(3, createFunctor(&DestroyableClass::method3)->getParamCount());
+        EXPECT_EQ(4, createFunctor(&DestroyableClass::method4)->getParamCount());
+        EXPECT_EQ(5, createFunctor(&DestroyableClass::method5)->getParamCount());
+    }
+
+    TEST_F(FunctorTest, HasReturnValue)
+    {
+        EXPECT_FALSE(createFunctor(&DestroyableClass::method0)->hasReturnvalue());
+        EXPECT_TRUE(createFunctor(&DestroyableClass::method1)->hasReturnvalue());
+        EXPECT_TRUE(createFunctor(&DestroyableClass::method2)->hasReturnvalue());
+        EXPECT_TRUE(createFunctor(&DestroyableClass::method3)->hasReturnvalue());
+        EXPECT_TRUE(createFunctor(&DestroyableClass::method4)->hasReturnvalue());
+        EXPECT_TRUE(createFunctor(&DestroyableClass::method5)->hasReturnvalue());
+    }
+
+    TEST_F(FunctorTest, GetTypenameParam)
+    {
+        FunctorPtr functor = createFunctor(&DestroyableClass::method5);
+        EXPECT_EQ("int",     functor->getTypenameParam(0));
+        EXPECT_EQ("float",   functor->getTypenameParam(1));
+        EXPECT_EQ("bool",    functor->getTypenameParam(2));
+        EXPECT_EQ("string",  functor->getTypenameParam(3));
+        EXPECT_EQ("Vector3", functor->getTypenameParam(4));
+        EXPECT_EQ("",        functor->getTypenameParam(5)); // max 5 arguments supported (index 0-4) -> this returns empty string
+    }
+
+    TEST_F(FunctorTest, TypenameParamIsAlwaysVoidForFunctionWithoutParams)
+    {
+        FunctorPtr functor = createFunctor(&DestroyableClass::method0);
+        EXPECT_EQ("void", functor->getTypenameParam(0));
+        EXPECT_EQ("void", functor->getTypenameParam(1));
+        EXPECT_EQ("void", functor->getTypenameParam(2));
+        EXPECT_EQ("void", functor->getTypenameParam(3));
+        EXPECT_EQ("void", functor->getTypenameParam(4));
+        EXPECT_EQ("",     functor->getTypenameParam(5)); // max 5 arguments supported (index 0-4) -> this returns empty string
+    }
+
+    TEST_F(FunctorTest, GetTypenameReturnvalue)
+    {
+        EXPECT_EQ("void",    createFunctor(&DestroyableClass::method0)->getTypenameReturnvalue());
+        EXPECT_EQ("int",     createFunctor(&DestroyableClass::method1)->getTypenameReturnvalue());
+        EXPECT_EQ("float",   createFunctor(&DestroyableClass::method2)->getTypenameReturnvalue());
+        EXPECT_EQ("bool",    createFunctor(&DestroyableClass::method3)->getTypenameReturnvalue());
+        EXPECT_EQ("string",  createFunctor(&DestroyableClass::method4)->getTypenameReturnvalue());
+        EXPECT_EQ("Vector3", createFunctor(&DestroyableClass::method5)->getTypenameReturnvalue());
+    }
+
+    TEST_F(FunctorTest, GetFullIdentifier)
+    {
+        // static
+        EXPECT_EQ(typeid(       void(*)()),                                                     createFunctor(&DestroyableClass::staticmethod0)->getFullIdentifier());
+        EXPECT_EQ(typeid(        int(*)(int)),                                                  createFunctor(&DestroyableClass::staticmethod1)->getFullIdentifier());
+        EXPECT_EQ(typeid(      float(*)(int, float)),                                           createFunctor(&DestroyableClass::staticmethod2)->getFullIdentifier());
+        EXPECT_EQ(typeid(       bool(*)(int, float, bool)),                                     createFunctor(&DestroyableClass::staticmethod3)->getFullIdentifier());
+        EXPECT_EQ(typeid(std::string(*)(int, float, bool, const std::string&)),                 createFunctor(&DestroyableClass::staticmethod4)->getFullIdentifier());
+        EXPECT_EQ(typeid(    Vector3(*)(int, float, bool, const std::string&, const Vector3&)), createFunctor(&DestroyableClass::staticmethod5)->getFullIdentifier());
+
+        // member
+        EXPECT_EQ(typeid(       void(DestroyableClass::*)()),                                                     createFunctor(&DestroyableClass::method0)->getFullIdentifier());
+        EXPECT_EQ(typeid(        int(DestroyableClass::*)(int)),                                                  createFunctor(&DestroyableClass::method1)->getFullIdentifier());
+        EXPECT_EQ(typeid(      float(DestroyableClass::*)(int, float)),                                           createFunctor(&DestroyableClass::method2)->getFullIdentifier());
+        EXPECT_EQ(typeid(       bool(DestroyableClass::*)(int, float, bool)),                                     createFunctor(&DestroyableClass::method3)->getFullIdentifier());
+        EXPECT_EQ(typeid(std::string(DestroyableClass::*)(int, float, bool, const std::string&)),                 createFunctor(&DestroyableClass::method4)->getFullIdentifier());
+        EXPECT_EQ(typeid(    Vector3(DestroyableClass::*)(int, float, bool, const std::string&, const Vector3&)), createFunctor(&DestroyableClass::method5)->getFullIdentifier());
+    }
+
+    TEST_F(FunctorTest, GetHeaderIdentifier)
+    {
+        // static
+        EXPECT_EQ(typeid(       void(*)()),                                                     createFunctor(&DestroyableClass::staticmethod0)->getHeaderIdentifier());
+        EXPECT_EQ(typeid(        int(*)(int)),                                                  createFunctor(&DestroyableClass::staticmethod1)->getHeaderIdentifier());
+        EXPECT_EQ(typeid(      float(*)(int, float)),                                           createFunctor(&DestroyableClass::staticmethod2)->getHeaderIdentifier());
+        EXPECT_EQ(typeid(       bool(*)(int, float, bool)),                                     createFunctor(&DestroyableClass::staticmethod3)->getHeaderIdentifier());
+        EXPECT_EQ(typeid(std::string(*)(int, float, bool, const std::string&)),                 createFunctor(&DestroyableClass::staticmethod4)->getHeaderIdentifier());
+        EXPECT_EQ(typeid(    Vector3(*)(int, float, bool, const std::string&, const Vector3&)), createFunctor(&DestroyableClass::staticmethod5)->getHeaderIdentifier());
+
+        // member
+        EXPECT_EQ(typeid(       void(*)()),                                                     createFunctor(&DestroyableClass::method0)->getHeaderIdentifier());
+        EXPECT_EQ(typeid(        int(*)(int)),                                                  createFunctor(&DestroyableClass::method1)->getHeaderIdentifier());
+        EXPECT_EQ(typeid(      float(*)(int, float)),                                           createFunctor(&DestroyableClass::method2)->getHeaderIdentifier());
+        EXPECT_EQ(typeid(       bool(*)(int, float, bool)),                                     createFunctor(&DestroyableClass::method3)->getHeaderIdentifier());
+        EXPECT_EQ(typeid(std::string(*)(int, float, bool, const std::string&)),                 createFunctor(&DestroyableClass::method4)->getHeaderIdentifier());
+        EXPECT_EQ(typeid(    Vector3(*)(int, float, bool, const std::string&, const Vector3&)), createFunctor(&DestroyableClass::method5)->getHeaderIdentifier());
+    }
+
+    TEST_F(FunctorTest, GetHeaderIdentifierFor2Params)
+    {
+        // static
+        EXPECT_EQ(typeid(       void(*)()),           createFunctor(&DestroyableClass::staticmethod0)->getHeaderIdentifier(2));
+        EXPECT_EQ(typeid(        int(*)(int)),        createFunctor(&DestroyableClass::staticmethod1)->getHeaderIdentifier(2));
+        EXPECT_EQ(typeid(      float(*)(int, float)), createFunctor(&DestroyableClass::staticmethod2)->getHeaderIdentifier(2));
+        EXPECT_EQ(typeid(       bool(*)(int, float)), createFunctor(&DestroyableClass::staticmethod3)->getHeaderIdentifier(2));
+        EXPECT_EQ(typeid(std::string(*)(int, float)), createFunctor(&DestroyableClass::staticmethod4)->getHeaderIdentifier(2));
+        EXPECT_EQ(typeid(    Vector3(*)(int, float)), createFunctor(&DestroyableClass::staticmethod5)->getHeaderIdentifier(2));
+
+        // member
+        EXPECT_EQ(typeid(       void(*)()),           createFunctor(&DestroyableClass::method0)->getHeaderIdentifier(2));
+        EXPECT_EQ(typeid(        int(*)(int)),        createFunctor(&DestroyableClass::method1)->getHeaderIdentifier(2));
+        EXPECT_EQ(typeid(      float(*)(int, float)), createFunctor(&DestroyableClass::method2)->getHeaderIdentifier(2));
+        EXPECT_EQ(typeid(       bool(*)(int, float)), createFunctor(&DestroyableClass::method3)->getHeaderIdentifier(2));
+        EXPECT_EQ(typeid(std::string(*)(int, float)), createFunctor(&DestroyableClass::method4)->getHeaderIdentifier(2));
+        EXPECT_EQ(typeid(    Vector3(*)(int, float)), createFunctor(&DestroyableClass::method5)->getHeaderIdentifier(2));
+    }
+
+    TEST_F(FunctorTest, GetHeaderIdentifierForNParams)
+    {
+        // static
+        FunctorStaticPtr functorStatic = createFunctor(&DestroyableClass::staticmethod5);
+        EXPECT_EQ(typeid(Vector3(*)()),                                                     functorStatic->getHeaderIdentifier(0));
+        EXPECT_EQ(typeid(Vector3(*)(int)),                                                  functorStatic->getHeaderIdentifier(1));
+        EXPECT_EQ(typeid(Vector3(*)(int, float)),                                           functorStatic->getHeaderIdentifier(2));
+        EXPECT_EQ(typeid(Vector3(*)(int, float, bool)),                                     functorStatic->getHeaderIdentifier(3));
+        EXPECT_EQ(typeid(Vector3(*)(int, float, bool, const std::string&)),                 functorStatic->getHeaderIdentifier(4));
+        EXPECT_EQ(typeid(Vector3(*)(int, float, bool, const std::string&, const Vector3&)), functorStatic->getHeaderIdentifier(5));
+        EXPECT_EQ(typeid(Vector3(*)(int, float, bool, const std::string&, const Vector3&)), functorStatic->getHeaderIdentifier(6));
+
+        // member
+        FunctorMemberPtr<DestroyableClass> functorMember = createFunctor(&DestroyableClass::method5);
+        EXPECT_EQ(typeid(Vector3(*)()),                                                     functorMember->getHeaderIdentifier(0));
+        EXPECT_EQ(typeid(Vector3(*)(int)),                                                  functorMember->getHeaderIdentifier(1));
+        EXPECT_EQ(typeid(Vector3(*)(int, float)),                                           functorMember->getHeaderIdentifier(2));
+        EXPECT_EQ(typeid(Vector3(*)(int, float, bool)),                                     functorMember->getHeaderIdentifier(3));
+        EXPECT_EQ(typeid(Vector3(*)(int, float, bool, const std::string&)),                 functorMember->getHeaderIdentifier(4));
+        EXPECT_EQ(typeid(Vector3(*)(int, float, bool, const std::string&, const Vector3&)), functorMember->getHeaderIdentifier(5));
+        EXPECT_EQ(typeid(Vector3(*)(int, float, bool, const std::string&, const Vector3&)), functorMember->getHeaderIdentifier(6));
+    }
+
+    TEST_F(FunctorTest, CanClone)
+    {
+        FunctorPtr functor = createFunctor(&f4a);
+        FunctorPtr clone = functor->clone();
+        EXPECT_NE(nullptr, clone.get());
+    }
+
+    TEST_F(FunctorTest, ClonedFunctorCanBeCalled)
+    {
+        FunctorPtr functor = createFunctor(&f4a);
+        FunctorPtr clone = functor->clone();
+
+        EXPECT_EQ(8, (*functor)(4).get<int>());
+        EXPECT_EQ(8, (*clone)(4).get<int>());
+    }
+
+    TEST_F(FunctorTest, ClonedFunctorKeepsFunction)
+    {
+        FunctorPtr functor = createFunctor(&f4a);
+        FunctorPointer<int(*)(int)>* pointer = static_cast<FunctorPointer<int(*)(int)>*>(functor.get());
+
+        FunctorPtr clone = functor->clone();
+        FunctorPointer<int(*)(int)>* clonePointer = static_cast<FunctorPointer<int(*)(int)>*>(clone.get());
+
+        EXPECT_EQ(&f4a, pointer->getFunction());
+        EXPECT_EQ(&f4a, clonePointer->getFunction());
+    }
+
+    TEST_F(FunctorTest, ClonedFunctorKeepsObject)
+    {
+        DestroyableClass object;
+        FunctorPtr functor = createFunctor(&DestroyableClass::method0, &object);
+        FunctorPtr clone = functor->clone();
+
+        EXPECT_EQ(&object, functor->getRawObjectPointer());
+        EXPECT_EQ(&object, clone->getRawObjectPointer());
+    }
+
+    // TODO: test fails... fix or delete clone()
+//    TEST_F(FunctorTest, ClonedFunctorKeepsSafeMode)
+//    {
+//        DestroyableClass* object = new DestroyableClass();
+//        FunctorPtr functor = createFunctor(&DestroyableClass::method0, object);
+//        functor->setSafeMode(true);
+//        FunctorPtr clone = functor->clone();
+//
+//        EXPECT_EQ(object, functor->getRawObjectPointer());
+//        EXPECT_EQ(object, clone->getRawObjectPointer());
+//        object->destroy();
+//        EXPECT_EQ(nullptr, functor->getRawObjectPointer());
+//        EXPECT_EQ(nullptr, clone->getRawObjectPointer());
+//
+//    }
+
+    TEST_F(FunctorTest, CanEvaluateArgument)
+    {
+        FunctorPtr functor = createFunctor(&f4a);
+        MultiType value("5");
+        EXPECT_FALSE(value.isType<int>());
+        EXPECT_TRUE(value.isType<std::string>());
+        functor->evaluateArgument(0, value);
+        EXPECT_TRUE(value.isType<int>());
+        EXPECT_FALSE(value.isType<std::string>());
+    }
+
+    TEST_F(FunctorTest, CanGetAndSetFunctionPointer)
+    {
+        FunctorPtr functor = createFunctor(&f4a);
+        FunctorPointer<int(*)(int)>* pointer = static_cast<FunctorPointer<int(*)(int)>*>(functor.get());
+
+        EXPECT_EQ(6, (*functor)(3).get<int>()); // 3*2 = 6
+        EXPECT_EQ(&f4a, pointer->getFunction());
+
+        pointer->setFunction(&f4b);
+
+        EXPECT_EQ(9, (*functor)(3).get<int>()); // 3*3 = 9
+        EXPECT_EQ(&f4b, pointer->getFunction());
+    }
+
+    TEST_F(FunctorTest, ReturnsValue)
+    {
+        DestroyableClass object;
+        {
+            FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method1);
+            int result = (*functor)(&object, 13);
+            EXPECT_EQ(13, result);
+        }
+        {
+            FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method2);
+            float result = (*functor)(&object, 0, 111.11f);
+            EXPECT_FLOAT_EQ(111.11f, result);
+        }
+        {
+            FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method3);
+            bool result = (*functor)(&object, 0, 0, true);
+            EXPECT_EQ(true, result);
+        }
+        {
+            FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method4);
+            std::string result = (*functor)(&object, 0, 0, false, "test");
+            EXPECT_EQ("test", result);
+        }
+        {
+            FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method5);
+            Vector3 result = (*functor)(&object, 0, 0, false, "", Vector3(3, 2, 1));
+            EXPECT_EQ(Vector3(3, 2, 1), result);
+        }
+    }
+
+
+    ///////////////////////////////////////////////////////////
+    ////////////////////// FunctorMember //////////////////////
+    ///////////////////////////////////////////////////////////
+
+    TEST_F(FunctorTest, FunctorMember_CanSetObject)
+    {
+        DestroyableClass object;
+
+        FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method0);
+        EXPECT_EQ(nullptr, functor->getObject());
+        functor->setObject(&object);
+        EXPECT_EQ(&object, functor->getObject());
+        functor->setObject(nullptr);
+        EXPECT_EQ(nullptr, functor->getObject());
+    }
+
+    TEST_F(FunctorTest, FunctorMember_CanSetObjectInConstructor)
+    {
+        DestroyableClass object;
+
+        FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method0, &object);
+        EXPECT_EQ(&object, functor->getObject());
+        functor->setObject(nullptr);
+        EXPECT_EQ(nullptr, functor->getObject());
+    }
+
+    TEST_F(FunctorTest, FunctorMember_CanSetRawObjectPointer)
+    {
+        DestroyableClass object;
+
+        FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method0);
+        EXPECT_EQ(nullptr, functor->getRawObjectPointer());
+        functor->setRawObjectPointer(&object);
+        EXPECT_EQ(&object, functor->getRawObjectPointer());
+        functor->setRawObjectPointer(nullptr);
+        EXPECT_EQ(nullptr, functor->getRawObjectPointer());
+    }
+
+    TEST_F(FunctorTest, FunctorMember_RawObjectPointerAndObjectAreEqual)
+    {
+        DestroyableClass object1;
+        DestroyableClass object2;
+
+        FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method0);
+        EXPECT_EQ(nullptr, functor->getRawObjectPointer());
+        EXPECT_EQ(nullptr, functor->getObject());
+        functor->setObject(&object1);
+        EXPECT_EQ(&object1, functor->getRawObjectPointer());
+        EXPECT_EQ(&object1, functor->getObject());
+        functor->setObject(&object2);
+        EXPECT_EQ(&object2, functor->getRawObjectPointer());
+        EXPECT_EQ(&object2, functor->getObject());
+    }
+
+    TEST_F(FunctorTest, FunctorMember_SafeModeWorks_SetObjectThenActivateSafeMode)
+    {
+        FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method0);
+        {
+            DestroyableClass object;
+            functor->setObject(&object);
+            functor->setSafeMode(true);
+            EXPECT_EQ(&object, functor->getObject());
+        }
+        EXPECT_EQ(nullptr, functor->getObject());
+    }
+
+    TEST_F(FunctorTest, FunctorMember_SafeModeWorks_ActivateSafeModeThenSetObject)
+    {
+        FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method0);
+        {
+            DestroyableClass object;
+            functor->setSafeMode(true);
+            functor->setObject(&object);
+            EXPECT_EQ(&object, functor->getObject());
+        }
+        EXPECT_EQ(nullptr, functor->getObject());
+    }
+
+    TEST_F(FunctorTest, FunctorMember_SafeModeCanBeDisabledAfterObjectWasSet)
+    {
+        DestroyableClass* ptr;
+        FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method0);
+        {
+            DestroyableClass object;
+            functor->setSafeMode(true);
+            functor->setObject(&object);
+            functor->setSafeMode(false);
+            ptr = &object; // remember the pointer
+            EXPECT_EQ(ptr, functor->getObject());
+        }
+        EXPECT_EQ(ptr, functor->getObject());
+    }
+
+    TEST_F(FunctorTest, FunctorMember_SafeModeWorks_CanChangeObject)
+    {
+        FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method0);
+        DestroyableClass* object1 = new DestroyableClass();
+        DestroyableClass* object2 = new DestroyableClass();
+        functor->setSafeMode(true);
+
+        functor->setObject(object1);
+        EXPECT_EQ(object1, functor->getObject());
+        functor->setObject(object2);
+        EXPECT_EQ(object2, functor->getObject());
+        object1->destroy();
+        EXPECT_EQ(object2, functor->getObject());
+        object2->destroy();
+        EXPECT_EQ(nullptr, functor->getObject());
+    }
+
+    TEST_F(FunctorTest, FunctorMember_CanDestroyFunctorWhenObjectInSafeModeStillExists)
+    {
+        DestroyableClass object;
+        {
+            FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method0);
+            functor->setSafeMode(true);
+            functor->setObject(&object);
+            EXPECT_EQ(&object, functor->getObject());
+        } // functor is destroyed here
+    }
+
+    TEST_F(FunctorTest, FunctorMember_SafeModeDoesntDoAnythingWithObjectsNotInheritedFromDestroyable)
+    {
+        NonDestroyableClass* ptr;
+        FunctorMemberPtr<NonDestroyableClass> functor = createFunctor(&NonDestroyableClass::method);
+        {
+            NonDestroyableClass object;
+            functor->setSafeMode(true);
+            functor->setObject(&object);
+            ptr = &object; // remember the pointer
+            EXPECT_EQ(ptr, functor->getObject());
+        }
+        EXPECT_EQ(ptr, functor->getObject()); // pointer is still set because safe mode doesn't work on NonDestroyableClass
+    }
+
+    TEST_F(FunctorTest, FunctorMember_CanCall_WithObjectInCall)
+    {
+        MockDestroyableClass mock;
+        {
+            EXPECT_CALL(mock, method0());
+            FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method0);
+            (*functor)(&mock);
+        }
+        {
+            EXPECT_CALL(mock, method1(13)).WillOnce(::testing::Return(0));
+            FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method1);
+            (*functor)(&mock, 13);
+        }
+        {
+            EXPECT_CALL(mock, method2(13, 111.11f)).WillOnce(::testing::Return(0.0f));
+            FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method2);
+            (*functor)(&mock, 13, 111.11f);
+        }
+        {
+            EXPECT_CALL(mock, method3(13, 111.11f, true)).WillOnce(::testing::Return(false));
+            FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method3);
+            (*functor)(&mock, 13, 111.11f, true);
+        }
+        {
+            EXPECT_CALL(mock, method4(13, 111.11f, true, "test")).WillOnce(::testing::Return(""));
+            FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method4);
+            (*functor)(&mock, 13, 111.11f, true, "test");
+        }
+        {
+            EXPECT_CALL(mock, method5(13, 111.11f, true, "test", Vector3(3, 2, 1))).WillOnce(::testing::Return(Vector3()));
+            FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method5);
+            (*functor)(&mock, 13, 111.11f, true, "test", Vector3(3, 2, 1));
+        }
+    }
+
+    TEST_F(FunctorTest, FunctorMember_CanCall_WithObjectInConstructor)
+    {
+        MockDestroyableClass mock;
+        {
+            EXPECT_CALL(mock, method0());
+            FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method0, &mock);
+            (*functor)();
+        }
+        {
+            EXPECT_CALL(mock, method1(13)).WillOnce(::testing::Return(0));
+            FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method1, &mock);
+            (*functor)(13);
+        }
+        {
+            EXPECT_CALL(mock, method2(13, 111.11f)).WillOnce(::testing::Return(0.0f));
+            FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method2, &mock);
+            (*functor)(13, 111.11f);
+        }
+        {
+            EXPECT_CALL(mock, method3(13, 111.11f, true)).WillOnce(::testing::Return(false));
+            FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method3, &mock);
+            (*functor)(13, 111.11f, true);
+        }
+        {
+            EXPECT_CALL(mock, method4(13, 111.11f, true, "test")).WillOnce(::testing::Return(""));
+            FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method4, &mock);
+            (*functor)(13, 111.11f, true, "test");
+        }
+        {
+            EXPECT_CALL(mock, method5(13, 111.11f, true, "test", Vector3(3, 2, 1))).WillOnce(::testing::Return(Vector3()));
+            FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method5, &mock);
+            (*functor)(13, 111.11f, true, "test", Vector3(3, 2, 1));
+        }
+    }
+
+    TEST_F(FunctorTest, FunctorMember_ReturnsZeroIfCalledWithoutObject)
+    {
+        DestroyableClass object;
+        {
+            FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method1);
+            int resultWithObject = (*functor)(&object, 13);
+            int resultWithoutObject = (*functor)(13);
+            EXPECT_EQ(13, resultWithObject);
+            EXPECT_EQ(0, resultWithoutObject);
+        }
+    }
+
+
+    ///////////////////////////////////////////////////////////
+    ////////////////////// FunctorStatic //////////////////////
+    ///////////////////////////////////////////////////////////
+
+    TEST_F(FunctorTest, FunctorStatic_CanCall)
+    {
+        MockDestroyableClass mock;
+        DestroyableClass::staticinstance = &mock;
+
+        {
+            EXPECT_CALL(mock, method0());
+            FunctorStaticPtr functor = createFunctor(&DestroyableClass::staticmethod0);
+            (*functor)();
+        }
+        {
+            EXPECT_CALL(mock, method1(13)).WillOnce(::testing::Return(0));
+            FunctorStaticPtr functor = createFunctor(&DestroyableClass::staticmethod1);
+            (*functor)(13);
+        }
+        {
+            EXPECT_CALL(mock, method2(13, 111.11f)).WillOnce(::testing::Return(0.0f));
+            FunctorStaticPtr functor = createFunctor(&DestroyableClass::staticmethod2);
+            (*functor)(13, 111.11f);
+        }
+        {
+            EXPECT_CALL(mock, method3(13, 111.11f, true)).WillOnce(::testing::Return(false));
+            FunctorStaticPtr functor = createFunctor(&DestroyableClass::staticmethod3);
+            (*functor)(13, 111.11f, true);
+        }
+        {
+            EXPECT_CALL(mock, method4(13, 111.11f, true, "test")).WillOnce(::testing::Return(""));
+            FunctorStaticPtr functor = createFunctor(&DestroyableClass::staticmethod4);
+            (*functor)(13, 111.11f, true, "test");
+        }
+        {
+            EXPECT_CALL(mock, method5(13, 111.11f, true, "test", Vector3(3, 2, 1))).WillOnce(::testing::Return(Vector3()));
+            FunctorStaticPtr functor = createFunctor(&DestroyableClass::staticmethod5);
+            (*functor)(13, 111.11f, true, "test", Vector3(3, 2, 1));
+        }
+    }
+
+    TEST_F(FunctorTest, FunctorStatic_CanCallWithObject)
+    {
+        MockDestroyableClass mock;
+        DestroyableClass::staticinstance = &mock;
+
+        {
+            EXPECT_CALL(mock, method0());
+            FunctorStaticPtr functor = createFunctor(&DestroyableClass::staticmethod0);
+            (*functor)(&mock); // object is ignored
+        }
+    }
+
+    TEST_F(FunctorTest, FunctorStatic_CanCallWithNull)
+    {
+        MockDestroyableClass mock;
+        DestroyableClass::staticinstance = &mock;
+
+        {
+            EXPECT_CALL(mock, method0());
+            FunctorStaticPtr functor = createFunctor(&DestroyableClass::staticmethod0);
+            (*functor)(nullptr); // pointer is ignored
+        }
+    }
+
+    TEST_F(FunctorTest, FunctorStatic_RawObjectPointerIsAlwaysNull)
+    {
+        DestroyableClass object;
+
+        FunctorStaticPtr functor = createFunctor(&DestroyableClass::staticmethod0);
+        EXPECT_EQ(nullptr, functor->getRawObjectPointer());
+        functor->setRawObjectPointer(&object);
+        EXPECT_EQ(nullptr, functor->getRawObjectPointer());
+        functor->setRawObjectPointer(nullptr);
+        EXPECT_EQ(nullptr, functor->getRawObjectPointer());
+    }
+
+    ////////////////////////////// Various tests //////////////////////////////
+
+    TEST_F(FunctorTest, CreateFunctorWithVariousFunctionTypes)
+    {
+        FunctorPtr c1 = createFunctor(&f4a);
+        FunctorPtr c2 = createFunctor(&f4b);
+        FunctorPtr c3 = createFunctor([] (int arg) { return arg*4; });
+        auto lambda = [] (int arg1, int arg2) { return arg1*arg2; };
+        FunctorPtr c4 = createFunctor(lambda);
+
+        std::function<int()> bind0 = std::bind(multiply, 4, 6);
+        std::function<int(int)> bind1 = std::bind(multiply, std::placeholders::_1, 7);
+        std::function<int(int, int)> bind2 = std::bind(multiply, std::placeholders::_1, std::placeholders::_2);
+        std::function<int(int)> function = f4a;
+
+        FunctorPtr c5 = createFunctor(bind0);
+        FunctorPtr c6 = createFunctor(bind1);
+        FunctorPtr c7 = createFunctor(bind2);
+        FunctorPtr c8 = createFunctor(function);
+
+
+        EXPECT_EQ(8,  (*c1)(4).get<int>());
+        EXPECT_EQ(12, (*c2)(4).get<int>());
+        EXPECT_EQ(16, (*c3)(4).get<int>());
+        EXPECT_EQ(20, (*c4)(4, 5).get<int>());
+        EXPECT_EQ(24, (*c5)(4).get<int>());
+        EXPECT_EQ(28, (*c6)(4).get<int>());
+        EXPECT_EQ(32, (*c7)(4, 8).get<int>());
+        EXPECT_EQ(8,  (*c8)(4).get<int>());
+
+        EXPECT_EQ(1, c1->getParamCount());
+        EXPECT_EQ(1, c2->getParamCount());
+        EXPECT_EQ(1, c3->getParamCount());
+        EXPECT_EQ(2, c4->getParamCount());
+        EXPECT_EQ(0, c5->getParamCount());
+        EXPECT_EQ(1, c6->getParamCount());
+        EXPECT_EQ(2, c7->getParamCount());
+        EXPECT_EQ(1, c8->getParamCount());
+
+        EXPECT_EQ(typeid(int(*)(int)), c1->getFullIdentifier());
+        EXPECT_EQ(typeid(int(*)(int)), c2->getFullIdentifier());
+        EXPECT_EQ(typeid(int(*)(int)), c3->getFullIdentifier());
+        EXPECT_EQ(typeid(int(*)(int, int)), c4->getFullIdentifier());
+        EXPECT_EQ(typeid(int(*)()), c5->getFullIdentifier());
+        EXPECT_EQ(typeid(int(*)(int)), c6->getFullIdentifier());
+        EXPECT_EQ(typeid(int(*)(int, int)), c7->getFullIdentifier());
+        EXPECT_EQ(typeid(int(*)(int)), c8->getFullIdentifier());
+
+        EXPECT_EQ(typeid(int(*)(int)), c1->getHeaderIdentifier());
+        EXPECT_EQ(typeid(int(*)(int)), c2->getHeaderIdentifier());
+        EXPECT_EQ(typeid(int(*)(int)), c3->getHeaderIdentifier());
+        EXPECT_EQ(typeid(int(*)(int, int)), c4->getHeaderIdentifier());
+        EXPECT_EQ(typeid(int(*)()), c5->getHeaderIdentifier());
+        EXPECT_EQ(typeid(int(*)(int)), c6->getHeaderIdentifier());
+        EXPECT_EQ(typeid(int(*)(int, int)), c7->getHeaderIdentifier());
+        EXPECT_EQ(typeid(int(*)(int)), c8->getHeaderIdentifier());
+
+        EXPECT_EQ(typeid(int(*)(int)), c1->getHeaderIdentifier(1));
+        EXPECT_EQ(typeid(int(*)(int)), c2->getHeaderIdentifier(1));
+        EXPECT_EQ(typeid(int(*)(int)), c3->getHeaderIdentifier(1));
+        EXPECT_EQ(typeid(int(*)(int)), c4->getHeaderIdentifier(1));
+        EXPECT_EQ(typeid(int(*)()), c5->getHeaderIdentifier(1));
+        EXPECT_EQ(typeid(int(*)(int)), c6->getHeaderIdentifier(1));
+        EXPECT_EQ(typeid(int(*)(int)), c7->getHeaderIdentifier(1));
+        EXPECT_EQ(typeid(int(*)(int)), c8->getHeaderIdentifier(1));
+
+        EXPECT_EQ(typeid(int(*)()), c1->getHeaderIdentifier(0));
+        EXPECT_EQ(typeid(int(*)()), c2->getHeaderIdentifier(0));
+        EXPECT_EQ(typeid(int(*)()), c3->getHeaderIdentifier(0));
+        EXPECT_EQ(typeid(int(*)()), c4->getHeaderIdentifier(0));
+        EXPECT_EQ(typeid(int(*)()), c5->getHeaderIdentifier(0));
+        EXPECT_EQ(typeid(int(*)()), c6->getHeaderIdentifier(0));
+        EXPECT_EQ(typeid(int(*)()), c7->getHeaderIdentifier(0));
+        EXPECT_EQ(typeid(int(*)()), c8->getHeaderIdentifier(0));
+    }
+
+    TEST_F(FunctorTest, CanCallFunctorWithLambdaWichIsAlreadyOutOfScope)
+    {
+        int var1 = 1;
+        FunctorPtr fp1a = createFunctor([&var1] () { return var1++; });
+        FunctorPtr fp1b = createFunctor([&var1] () { return var1; });
+        FunctorPtr fp2;
+        FunctorPtr fp3;
+
+        {
+            int var2 = 2;
+            fp2 = createFunctor([var2] () { return var2; });
+        }
+        {
+            int var3 = 3;
+            fp3 = createFunctor([var3] () { return var3; });
+        }
+
+        EXPECT_EQ(1, var1);
+        EXPECT_EQ(1, (*fp1a)().get<int>());
+        EXPECT_EQ(2, var1);
+        EXPECT_EQ(2, (*fp1b)().get<int>());
+
+        EXPECT_EQ(2, (*fp2)().get<int>());
+        EXPECT_EQ(3, (*fp3)().get<int>());
+    }
+
+    TEST_F(FunctorTest, canCompareHeaderIdentifiers)
+    {
+        FunctorPtr fp1 = createFunctor(&f1);
+        FunctorPtr fp2 = createFunctor(&f2);
+        FunctorPtr fp3 = createFunctor(&f3);
+        ASSERT_STREQ(fp1->getHeaderIdentifier(1).name(), fp2->getHeaderIdentifier(1).name());
+        ASSERT_STREQ(fp1->getHeaderIdentifier(2).name(), fp2->getHeaderIdentifier(2).name());
+        ASSERT_STRNE(fp1->getHeaderIdentifier(1).name(), fp2->getHeaderIdentifier(2).name());
+        ASSERT_STRNE(fp1->getHeaderIdentifier(10).name(), fp2->getHeaderIdentifier(10).name());
+        ASSERT_STRNE(fp2->getHeaderIdentifier(2).name(), fp3->getHeaderIdentifier(2).name());
+        ASSERT_STRNE(fp1->getHeaderIdentifier().name(), fp2->getHeaderIdentifier().name());
+        ASSERT_STRNE(fp2->getHeaderIdentifier().name(), fp3->getHeaderIdentifier().name());
+    }
+
+    TEST_F(FunctorTest, canCompareTypenames)
+    {
+        FunctorPtr fp1 = createFunctor(&f1);
+        FunctorPtr fp2 = createFunctor(&f2);
+        FunctorPtr fp3 = createFunctor(&f3);
+        ASSERT_EQ(fp1->getTypenameReturnvalue(), fp2->getTypenameReturnvalue());
+        ASSERT_EQ(fp1->getTypenameParam(0), fp3->getTypenameParam(0));
+        ASSERT_EQ("void", fp1->getTypenameReturnvalue());
+        ASSERT_EQ("int", fp3->getTypenameReturnvalue());
+        ASSERT_EQ("int", fp2->getTypenameParam(0));
+        ASSERT_EQ("double", fp3->getTypenameParam(2));
+        ASSERT_EQ("", fp3->getTypenameParam(6));
+    }
+
+    TEST_F(FunctorTest, testGetParamCountAndHasReturnValue)
+    {
+        FunctorPtr fp1 = createFunctor(&f1);
+        FunctorPtr fp2 = createFunctor(&f2);
+        FunctorPtr fp3 = createFunctor(&f3);
+        ASSERT_EQ(3, fp2->getParamCount());
+        ASSERT_NE(fp1->getParamCount(), fp3->getParamCount());
+        ASSERT_FALSE(fp2->hasReturnvalue());
+        ASSERT_TRUE(fp3->hasReturnvalue());
+    }
+
+    TEST_F(FunctorTest, canEvaluateArgument)
+    {
+        FunctorPtr fp1 = createFunctor(&f1);
+        MultiType mttype = "2";
+        fp1->evaluateArgument(0, mttype);
+        ASSERT_TRUE(mttype.isType<int>());
+        ASSERT_EQ(2, mttype.get<int>());
+        fp1->evaluateArgument(1, mttype);
+        ASSERT_TRUE(mttype.isType<double>());
+        ASSERT_EQ(2.0, mttype.get<double>());
+        mttype.reset();
+        fp1->evaluateArgument(5, mttype);
+        ASSERT_TRUE(mttype.null());
+    }
+
+    TEST_F(FunctorTest, canUseCallables)
+    {
+        int a = 0;
+        FunctorPtr fp1 = createFunctor(CallableStruct{});
+        FunctorPtr fp2 = createFunctor([](bool val) { return val; });
+        FunctorPtr fp3 = createFunctor([&a]() {return a++; });
+        FunctorPtr fp4 = createFunctor([a]() {return a; });
+        ASSERT_EQ(1, (*fp1)().get<int>());
+        ASSERT_EQ(true, (*fp2)(true).get<bool>());
+        ASSERT_EQ(0, (*fp3)().get<int>());
+        ASSERT_EQ(1, a);
+        ASSERT_EQ(0, (*fp4)().get<int>());
+        ASSERT_STREQ(fp1->getHeaderIdentifier().name(), fp3->getHeaderIdentifier().name());
+    }
+
+    TEST_F(FunctorTest, SafeModeWorks)
+    {
+        DestroyableClass* testclass = new DestroyableClass();
+        DestroyableClass* testclass2 = new DestroyableClass();
+        FunctorPtr fp1 = createFunctor(&DestroyableClass::method0, testclass);
+        fp1->setSafeMode(true);
+        FunctorPtr fp2 = createFunctor(&DestroyableClass::method0, testclass);
+        fp2->setSafeMode(true);
+        FunctorPtr fp3 = createFunctor(&DestroyableClass::method0, testclass);
+        fp2->setRawObjectPointer(testclass2);
+
+        ASSERT_NE(nullptr, fp1->getRawObjectPointer());
+        ASSERT_NE(nullptr, fp2->getRawObjectPointer());
+        ASSERT_NE(nullptr, fp3->getRawObjectPointer());
+        testclass->destroy();
+        ASSERT_EQ(nullptr, fp1->getRawObjectPointer());
+        ASSERT_NE(nullptr, fp2->getRawObjectPointer());
+        ASSERT_NE(nullptr, fp3->getRawObjectPointer());
+
+        fp3->setRawObjectPointer(testclass2);
+        fp3->setSafeMode(true);
+        fp2->setSafeMode(false);
+        testclass2->destroy();
+        ASSERT_NE(nullptr, fp2->getRawObjectPointer());
+        ASSERT_EQ(nullptr, fp3->getRawObjectPointer());
+    }
+}
Index: code/trunk/test/core/object/ClassFactoryTest.cc
===================================================================
--- code/trunk/test/core/object/ClassFactoryTest.cc	(revision 11052)
+++ code/trunk/test/core/object/ClassFactoryTest.cc	(revision 11071)
@@ -14,12 +14,12 @@
         {
             public:
-                virtual void SetUp()
+                virtual void SetUp() override
                 {
                     new IdentifierManager();
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
-                    Context::setRootContext(new Context(NULL));
+                    Context::setRootContext(new Context(nullptr));
                 }
 
-                virtual void TearDown()
+                virtual void TearDown() override
                 {
                     Context::destroyRootContext();
@@ -33,8 +33,8 @@
     {
         Factory* factory = new ClassFactoryWithContext<BaseObject>();
-        Identifiable* object = factory->fabricate(NULL);
-        ASSERT_TRUE(object != NULL);
+        Identifiable* object = factory->fabricate(nullptr);
+        ASSERT_TRUE(object != nullptr);
         BaseObject* baseObject = dynamic_cast<BaseObject*>(object);
-        EXPECT_TRUE(baseObject != NULL);
+        EXPECT_TRUE(baseObject != nullptr);
         delete object;
         // don't delete factory - it remains in the identifier
Index: code/trunk/test/core/object/ContextTest.cc
===================================================================
--- code/trunk/test/core/object/ContextTest.cc	(revision 11052)
+++ code/trunk/test/core/object/ContextTest.cc	(revision 11071)
@@ -12,5 +12,5 @@
         {
             public:
-                SubclassContext() : Context(NULL) { RegisterObject(SubclassContext); }
+                SubclassContext() : Context(nullptr) { RegisterObject(SubclassContext); }
         };
 
@@ -21,12 +21,12 @@
         {
             public:
-                virtual void SetUp()
+                virtual void SetUp() override
                 {
                     new IdentifierManager();
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
-                    Context::setRootContext(new Context(NULL));
+                    Context::setRootContext(new Context(nullptr));
                 }
 
-                virtual void TearDown()
+                virtual void TearDown() override
                 {
                     Context::destroyRootContext();
@@ -39,5 +39,5 @@
     TEST_F(ContextTest, CanCreateContext)
     {
-        Context context(NULL);
+        Context context(nullptr);
     }
 
@@ -49,5 +49,5 @@
     TEST_F(ContextTest, ContextIsItsOwnContext)
     {
-        Context context(NULL);
+        Context context(nullptr);
         EXPECT_EQ(&context, context.getContext());
     }
@@ -68,5 +68,5 @@
     TEST_F(ContextTest, ContextIsAddedToItsOwnObjectList)
     {
-        Context context(NULL);
+        Context context(nullptr);
         ASSERT_EQ(1u, context.getObjectList<Context>()->size());
         EXPECT_TRUE(context.getObjectList<Context>()->begin()->objectBase_ == static_cast<Listable*>(&context));
@@ -75,5 +75,5 @@
     TEST_F(ContextTest, ContextIsAddedToObjectListOfBaseContext)
     {
-        Context baseContext(NULL);
+        Context baseContext(nullptr);
         Context subContext(&baseContext);
 
Index: code/trunk/test/core/object/DestroyableTest.cc
===================================================================
--- code/trunk/test/core/object/DestroyableTest.cc	(revision 11052)
+++ code/trunk/test/core/object/DestroyableTest.cc	(revision 11071)
@@ -32,5 +32,5 @@
         DestroyableTest* test = new DestroyableTest(destroyed);
         EXPECT_FALSE(destroyed);
-        EXPECT_TRUE(test != NULL);
+        EXPECT_TRUE(test != nullptr);
         test->destroy();
         EXPECT_TRUE(destroyed);
Index: code/trunk/test/core/object/IteratorTest.cc
===================================================================
--- code/trunk/test/core/object/IteratorTest.cc	(revision 11052)
+++ code/trunk/test/core/object/IteratorTest.cc	(revision 11071)
@@ -15,5 +15,5 @@
         {
             public:
-            TestInterface() { RegisterObject(TestInterface); }
+                TestInterface() { RegisterObject(TestInterface); }
         };
 
@@ -32,12 +32,12 @@
         {
             public:
-                virtual void SetUp()
+                virtual void SetUp() override
                 {
                     new IdentifierManager();
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
-                    Context::setRootContext(new Context(NULL));
+                    Context::setRootContext(new Context(nullptr));
                 }
 
-                virtual void TearDown()
+                virtual void TearDown() override
                 {
                     Context::destroyRootContext();
@@ -55,5 +55,6 @@
     TEST_F(IteratorTest, CanAssignIterator)
     {
-        Iterator<TestInterface> it = ObjectList<TestInterface>::begin();
+        ObjectList<TestInterface> list;
+        Iterator<TestInterface> it = list.begin();
     }
 
@@ -61,5 +62,6 @@
     {
         size_t i = 0;
-        for (Iterator<TestInterface> it = ObjectList<TestInterface>::begin(); it != ObjectList<TestInterface>::end(); ++it)
+        ObjectList<TestInterface> list;
+        for (Iterator<TestInterface> it = list.begin(); it != list.end(); ++it)
             ++i;
         EXPECT_EQ(0u, i);
@@ -77,6 +79,69 @@
 
         // iterate over interfaces but use a TestClass iterator - now we can call TestClass::test()
-        for (Iterator<TestClass> it = ObjectList<TestInterface>::begin(); it != ObjectList<TestInterface>::end(); ++it)
+        ObjectList<TestInterface> list;
+        for (Iterator<TestClass> it = list.begin(); it != list.end(); ++it)
             it->test();
     }
+
+    TEST_F(IteratorTest, CanIterateOverInterfaceListWithInterfaceIterator)
+    {
+        TestClass testClass;
+        TestInterface testInterface;
+
+        size_t i = 0;
+        ObjectList<TestInterface> list;
+        for (Iterator<TestInterface> it = list.begin(); it != list.end(); ++it)
+        {
+            ++i;
+            if (i == 1u) EXPECT_EQ(&testClass, *it);
+            if (i == 2u) EXPECT_EQ(&testInterface, *it);
+        }
+        EXPECT_EQ(2u, i);
+    }
+
+    TEST_F(IteratorTest, CanIterateOverClassListWithClassIterator)
+    {
+        TestClass testClass;
+        TestInterface testInterface;
+
+        size_t i = 0;
+        ObjectList<TestClass> list;
+        for (Iterator<TestClass> it = list.begin(); it != list.end(); ++it)
+        {
+            ++i;
+            if (i == 1u) EXPECT_EQ(&testClass, *it);
+        }
+        EXPECT_EQ(1u, i);
+    }
+
+    TEST_F(IteratorTest, CanIterateOverInterfaceListWithClassIterator)
+    {
+        TestClass testClass;
+        TestInterface testInterface;
+
+        size_t i = 0;
+        ObjectList<TestInterface> list;
+        for (Iterator<TestClass> it = list.begin(); it != list.end(); ++it)
+        {
+            ++i;
+            if (i == 1u) EXPECT_EQ(&testClass, *it);
+            if (i == 2u) EXPECT_EQ(nullptr, *it);
+        }
+        EXPECT_EQ(2u, i);
+    }
+
+    TEST_F(IteratorTest, CanIterateOverClassListWithInterfaceIterator)
+    {
+        TestClass testClass;
+        TestInterface testInterface;
+
+        size_t i = 0;
+        ObjectList<TestClass> list;
+        for (Iterator<TestInterface> it = list.begin(); it != list.end(); ++it)
+        {
+            ++i;
+            if (i == 1u) EXPECT_EQ(&testClass, *it);
+        }
+        EXPECT_EQ(1u, i);
+    }
 }
Index: code/trunk/test/core/object/ListableTest.cc
===================================================================
--- code/trunk/test/core/object/ListableTest.cc	(revision 11052)
+++ code/trunk/test/core/object/ListableTest.cc	(revision 11071)
@@ -37,12 +37,12 @@
         {
             public:
-                virtual void SetUp()
+                virtual void SetUp() override
                 {
                     new IdentifierManager();
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
-                    Context::setRootContext(new Context(NULL));
+                    Context::setRootContext(new Context(nullptr));
                 }
 
-                virtual void TearDown()
+                virtual void TearDown() override
                 {
                     Context::destroyRootContext();
@@ -56,5 +56,5 @@
     {
         ListableClassTest* test = new ListableClassTest();
-        ASSERT_TRUE(test != NULL);
+        ASSERT_TRUE(test != nullptr);
         delete test;
     }
@@ -63,5 +63,5 @@
     {
         ListableClassTest test;
-        EXPECT_EQ(1u, ObjectList<ListableClassTest>::size());
+        EXPECT_EQ(1u, ObjectList<ListableClassTest>().size());
         EXPECT_TRUE(objectListContains<ListableClassTest>(&test));
     }
@@ -70,7 +70,7 @@
     {
         ListableSubclassTest test;
-        EXPECT_EQ(1u, ObjectList<ListableClassTest>::size());
+        EXPECT_EQ(1u, ObjectList<ListableClassTest>().size());
         EXPECT_TRUE(objectListContains<ListableClassTest>(&test));
-        EXPECT_EQ(1u, ObjectList<ListableSubclassTest>::size());
+        EXPECT_EQ(1u, ObjectList<ListableSubclassTest>().size());
         EXPECT_TRUE(objectListContains<ListableSubclassTest>(&test));
     }
@@ -78,31 +78,31 @@
     TEST_F(ListableTest, RemovesFromObjectList)
     {
-        EXPECT_EQ(0u, ObjectList<ListableClassTest>::size());
+        EXPECT_EQ(0u, ObjectList<ListableClassTest>().size());
         {
             ListableClassTest test;
-            EXPECT_EQ(1u, ObjectList<ListableClassTest>::size());
+            EXPECT_EQ(1u, ObjectList<ListableClassTest>().size());
             EXPECT_TRUE(objectListContains<ListableClassTest>(&test));
         }
-        EXPECT_EQ(0u, ObjectList<ListableClassTest>::size());
+        EXPECT_EQ(0u, ObjectList<ListableClassTest>().size());
     }
 
     TEST_F(ListableTest, RemovesFromAllObjectLists)
     {
-        EXPECT_EQ(0u, ObjectList<ListableClassTest>::size());
-        EXPECT_EQ(0u, ObjectList<ListableSubclassTest>::size());
+        EXPECT_EQ(0u, ObjectList<ListableClassTest>().size());
+        EXPECT_EQ(0u, ObjectList<ListableSubclassTest>().size());
         {
             ListableSubclassTest test;
-            EXPECT_EQ(1u, ObjectList<ListableClassTest>::size());
+            EXPECT_EQ(1u, ObjectList<ListableClassTest>().size());
             EXPECT_TRUE(objectListContains<ListableClassTest>(&test));
-            EXPECT_EQ(1u, ObjectList<ListableSubclassTest>::size());
+            EXPECT_EQ(1u, ObjectList<ListableSubclassTest>().size());
             EXPECT_TRUE(objectListContains<ListableSubclassTest>(&test));
         }
-        EXPECT_EQ(0u, ObjectList<ListableClassTest>::size());
-        EXPECT_EQ(0u, ObjectList<ListableSubclassTest>::size());
+        EXPECT_EQ(0u, ObjectList<ListableClassTest>().size());
+        EXPECT_EQ(0u, ObjectList<ListableSubclassTest>().size());
     }
 
     TEST_F(ListableTest, CanAddObjectToContext)
     {
-        Context context(NULL);
+        Context context(nullptr);
         ListableSubclassTest test;
 
@@ -118,5 +118,5 @@
     TEST_F(ListableTest, CanAddObjectToSubContext)
     {
-        Context baseContext(NULL);
+        Context baseContext(nullptr);
         Context subContext(&baseContext);
         ListableSubclassTest test;
@@ -139,5 +139,5 @@
     {
         Context* rootContext = Context::getRootContext();
-        Context newContext(NULL);
+        Context newContext(nullptr);
         ListableSubclassTest test;
 
Index: code/trunk/test/core/object/ObjectListBaseTest.cc
===================================================================
--- code/trunk/test/core/object/ObjectListBaseTest.cc	(revision 11052)
+++ code/trunk/test/core/object/ObjectListBaseTest.cc	(revision 11071)
@@ -24,5 +24,5 @@
     {
         ObjectListBase list;
-        ObjectListBaseElement* element = new ObjectListElement<Listable>(NULL);
+        ObjectListBaseElement* element = new ObjectListElement<Listable>(nullptr);
         list.addElement(element);
         EXPECT_EQ(1u, list.size());
@@ -32,5 +32,5 @@
     {
         ObjectListBase list;
-        ObjectListBaseElement* element = new ObjectListElement<Listable>(NULL);
+        ObjectListBaseElement* element = new ObjectListElement<Listable>(nullptr);
         list.addElement(element);
         EXPECT_EQ(1u, list.size());
@@ -43,5 +43,5 @@
     {
         ObjectListBase list;
-        list.addElement(new ObjectListElement<Listable>(NULL));
+        list.addElement(new ObjectListElement<Listable>(nullptr));
         EXPECT_EQ(1u, list.size());
     }
@@ -52,13 +52,13 @@
         EXPECT_EQ(0u, list.size());
         {
-            ObjectListElement<Listable> element1(NULL);
+            ObjectListElement<Listable> element1(nullptr);
             list.addElement(&element1);
             EXPECT_EQ(1u, list.size());
             {
-                ObjectListElement<Listable> element1(NULL);
+                ObjectListElement<Listable> element1(nullptr);
                 list.addElement(&element1);
                 EXPECT_EQ(2u, list.size());
                 {
-                    ObjectListElement<Listable> element1(NULL);
+                    ObjectListElement<Listable> element1(nullptr);
                     list.addElement(&element1);
                     EXPECT_EQ(3u, list.size());
@@ -76,5 +76,5 @@
         ObjectListElementRemovalListenerMock listener;
         list.registerRemovalListener(&listener);
-        ObjectListBaseElement* element = new ObjectListElement<Listable>(NULL);
+        ObjectListBaseElement* element = new ObjectListElement<Listable>(nullptr);
         list.addElement(element);
         EXPECT_CALL(listener, removedElement(element));
Index: code/trunk/test/core/object/ObjectListIteratorTest.cc
===================================================================
--- code/trunk/test/core/object/ObjectListIteratorTest.cc	(revision 11052)
+++ code/trunk/test/core/object/ObjectListIteratorTest.cc	(revision 11071)
@@ -3,5 +3,6 @@
 
 #include "core/object/ObjectListIterator.h"
-#include "core/object/Listable.h"
+#include "core/class/OrxonoxClass.h"
+#include "core/class/OrxonoxInterface.h"
 #include "core/CoreIncludes.h"
 #include "core/module/ModuleInstance.h"
@@ -11,12 +12,19 @@
     namespace
     {
-        class ListableTest : public Listable
+        class TestInterface : virtual public OrxonoxInterface
         {
             public:
-                ListableTest() { RegisterObject(ListableTest); }
+                TestInterface() { RegisterObject(TestInterface); }
+        };
+
+        class TestClass : public OrxonoxClass, public TestInterface
+        {
+            public:
+                TestClass() { RegisterObject(TestClass); }
                 MOCK_METHOD0(test, void());
         };
 
-        RegisterClassNoArgs(ListableTest);
+        RegisterClassNoArgs(TestInterface);
+        RegisterClassNoArgs(TestClass);
 
         // Fixture
@@ -24,12 +32,12 @@
         {
             public:
-                virtual void SetUp()
+                virtual void SetUp() override
                 {
                     new IdentifierManager();
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
-                    Context::setRootContext(new Context(NULL));
+                    Context::setRootContext(new Context(nullptr));
                 }
 
-                virtual void TearDown()
+                virtual void TearDown() override
                 {
                     Context::destroyRootContext();
@@ -42,10 +50,11 @@
     TEST_F(ObjectListIteratorTest, CanCreateIterator)
     {
-        ObjectListIterator<ListableTest> it;
+        ObjectListIterator<TestClass> it;
     }
 
     TEST_F(ObjectListIteratorTest, CanAssignIterator)
     {
-        ObjectListIterator<ListableTest> it = ObjectList<ListableTest>::begin();
+        ObjectList<TestClass> list;
+        ObjectListIterator<TestClass> it = list.begin();
     }
 
@@ -53,5 +62,6 @@
     {
         size_t i = 0;
-        for (ObjectListIterator<ListableTest> it = ObjectList<ListableTest>::begin(); it != ObjectList<ListableTest>::end(); ++it)
+        ObjectList<TestClass> list;
+        for (ObjectListIterator<TestClass> it = list.begin(); it != list.end(); ++it)
             ++i;
         EXPECT_EQ(0u, i);
@@ -60,10 +70,12 @@
     TEST_F(ObjectListIteratorTest, CanIterateOverFullList)
     {
-        ListableTest test1;
-        ListableTest test2;
-        ListableTest test3;
+        TestClass test1;
+        TestClass test2;
+        TestClass test3;
+        TestInterface interface;
 
         size_t i = 0;
-        for (ObjectListIterator<ListableTest> it = ObjectList<ListableTest>::begin(); it != ObjectList<ListableTest>::end(); ++it)
+        ObjectList<TestClass> list;
+        for (ObjectListIterator<TestClass> it = list.begin(); it != list.end(); ++it)
         {
             ++i;
@@ -77,10 +89,12 @@
     TEST_F(ObjectListIteratorTest, CanIterateReverseOverFullList)
     {
-        ListableTest test1;
-        ListableTest test2;
-        ListableTest test3;
+        TestClass test1;
+        TestClass test2;
+        TestClass test3;
+        TestInterface interface;
 
         size_t i = 0;
-        for (ObjectListIterator<ListableTest> it = ObjectList<ListableTest>::rbegin(); it != ObjectList<ListableTest>::rend(); --it)
+        ObjectList<TestClass> list;
+        for (ObjectListIterator<TestClass> it = list.rbegin(); it != list.rend(); --it)
         {
             ++i;
@@ -94,7 +108,8 @@
     TEST_F(ObjectListIteratorTest, CanCallObjects)
     {
-        ListableTest test1;
-        ListableTest test2;
-        ListableTest test3;
+        TestClass test1;
+        TestClass test2;
+        TestClass test3;
+        TestInterface interface;
 
         EXPECT_CALL(test1, test());
@@ -102,5 +117,6 @@
         EXPECT_CALL(test3, test());
 
-        for (ObjectListIterator<ListableTest> it = ObjectList<ListableTest>::begin(); it != ObjectList<ListableTest>::end(); ++it)
+        ObjectList<TestClass> list;
+        for (ObjectListIterator<TestClass> it = list.begin(); it != list.end(); ++it)
             it->test();
     }
Index: code/trunk/test/core/object/ObjectListTest.cc
===================================================================
--- code/trunk/test/core/object/ObjectListTest.cc	(revision 11071)
+++ code/trunk/test/core/object/ObjectListTest.cc	(revision 11071)
@@ -0,0 +1,150 @@
+#include <gtest/gtest.h>
+#include <gmock/gmock.h>
+
+#include "core/object/ObjectListIterator.h"
+#include "core/object/Listable.h"
+#include "core/CoreIncludes.h"
+#include "core/module/ModuleInstance.h"
+
+namespace orxonox
+{
+    namespace
+    {
+        class ListableTest : public Listable
+        {
+            public:
+                ListableTest() { RegisterObject(ListableTest); }
+                ListableTest(Context* context) : Listable(context) { RegisterObject(ListableTest); }
+                MOCK_METHOD0(test, void());
+        };
+
+        RegisterClassNoArgs(ListableTest);
+
+        // Fixture
+        class ObjectListTest : public ::testing::Test
+        {
+            public:
+                virtual void SetUp() override
+                {
+                    new IdentifierManager();
+                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
+                    Context::setRootContext(new Context(nullptr));
+                }
+
+                virtual void TearDown() override
+                {
+                    Context::destroyRootContext();
+                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
+                    delete &IdentifierManager::getInstance();
+                }
+        };
+    }
+    
+    TEST_F(ObjectListTest, CanIterateOverEmptyList)
+    {
+        size_t i = 0;
+        for (ListableTest* object : ObjectList<ListableTest>())
+        {
+            ++i;
+            ((void*)object); // avoid warning about unused variable
+        }
+        EXPECT_EQ(0u, i);
+    }
+
+    TEST_F(ObjectListTest, CanIterateOverFullList)
+    {
+        ListableTest test1;
+        ListableTest test2;
+        ListableTest test3;
+
+        size_t i = 0;
+        for (ListableTest* object : ObjectList<ListableTest>())
+        {
+            ++i;
+            if (i == 1u) EXPECT_EQ(&test1, object);
+            if (i == 2u) EXPECT_EQ(&test2, object);
+            if (i == 3u) EXPECT_EQ(&test3, object);
+        }
+        EXPECT_EQ(3u, i);
+    }
+    
+    TEST_F(ObjectListTest, CanIterateOverFullList_Expanded)
+    {
+        ListableTest test1;
+        ListableTest test2;
+        ListableTest test3;
+
+        size_t i = 0;
+        ObjectList<ListableTest>&& __range = ObjectList<ListableTest>();
+        ObjectListIterator<ListableTest> __begin = __range.begin();
+        ObjectListIterator<ListableTest>__end = __range.end();
+        for (; __begin != __end; ++__begin)
+        {
+            ListableTest* object = *__begin;
+
+            ++i;
+            if (i == 1u) EXPECT_EQ(&test1, object);
+            if (i == 2u) EXPECT_EQ(&test2, object);
+            if (i == 3u) EXPECT_EQ(&test3, object);
+        }
+        EXPECT_EQ(3u, i);
+    }
+    
+    TEST_F(ObjectListTest, CanCallObjects)
+    {
+        ListableTest test1;
+        ListableTest test2;
+        ListableTest test3;
+
+        EXPECT_CALL(test1, test());
+        EXPECT_CALL(test2, test());
+        EXPECT_CALL(test3, test());
+
+        for (ListableTest* object : ObjectList<ListableTest>())
+            object->test();
+    }
+
+    TEST_F(ObjectListTest, UsesCorrectContext)
+    {
+        Context context1(Context::getRootContext());
+        Context context2(Context::getRootContext());
+
+        ListableTest test1(&context1);
+        ListableTest test2(&context1);
+        ListableTest test3(&context2);
+
+        EXPECT_EQ(3, ObjectList<ListableTest>().size());
+        EXPECT_EQ(2, ObjectList<ListableTest>(&context1).size());
+        EXPECT_EQ(1, ObjectList<ListableTest>(&context2).size());
+    }
+
+    TEST_F(ObjectListTest, CanIterateOverCorrectContext)
+    {
+        Context context1(Context::getRootContext());
+        Context context2(Context::getRootContext());
+
+        ListableTest test1(&context1);
+        ListableTest test2(&context1);
+        ListableTest test3(&context2);
+
+        {
+            size_t i = 0;
+            for (ListableTest* object : ObjectList<ListableTest>(&context1))
+            {
+                ++i;
+                if (i == 1u) EXPECT_EQ(&test1, object);
+                if (i == 2u) EXPECT_EQ(&test2, object);
+            }
+            EXPECT_EQ(2u, i);
+        }
+        {
+            size_t i = 0;
+            for (ListableTest* object : ObjectList<ListableTest>(&context2))
+            {
+                ++i;
+                if (i == 1u) EXPECT_EQ(&test3, object);
+            }
+            EXPECT_EQ(1u, i);
+        }
+    }
+}
Index: code/trunk/test/core/object/StrongPtrTest.cc
===================================================================
--- code/trunk/test/core/object/StrongPtrTest.cc	(revision 11052)
+++ code/trunk/test/core/object/StrongPtrTest.cc	(revision 11071)
@@ -1,2 +1,3 @@
+#include <utility>
 #include <gtest/gtest.h>
 #include "core/object/StrongPtr.h"
@@ -23,4 +24,20 @@
         StrongPtr<DestroyableTest> strongPtr = test;
         EXPECT_EQ(test, strongPtr.get());
+        EXPECT_EQ(test, &(*strongPtr));
+        EXPECT_EQ(static_cast<Destroyable*>(test), strongPtr.getBase());
+        test->destroy();
+    }
+
+    TEST(StrongPtrTest, CanHaveMultiplePointers)
+    {
+        bool bla;
+        DestroyableTest* test = new DestroyableTest(bla);
+        StrongPtr<DestroyableTest> strongPtr1 = test;
+        StrongPtr<DestroyableTest> strongPtr2 = test;
+        StrongPtr<DestroyableTest> strongPtr3 = test;
+        EXPECT_EQ(test, strongPtr1.get());
+        EXPECT_EQ(test, strongPtr2.get());
+        EXPECT_EQ(test, strongPtr3.get());
+        EXPECT_EQ(3u, test->getReferenceCount());
         test->destroy();
     }
@@ -94,9 +111,9 @@
     void isNull(const StrongPtr<DestroyableTest> strongPtr)
     {
-        EXPECT_TRUE(strongPtr == NULL);
-        EXPECT_TRUE(strongPtr == 0);
+        EXPECT_TRUE(strongPtr == nullptr);
+        EXPECT_TRUE(strongPtr == nullptr);
         EXPECT_TRUE(!strongPtr);
-        EXPECT_FALSE(strongPtr != NULL);
-        EXPECT_FALSE(strongPtr != 0);
+        EXPECT_FALSE(strongPtr != nullptr);
+        EXPECT_FALSE(strongPtr != nullptr);
         EXPECT_FALSE(strongPtr);
     }
@@ -109,19 +126,19 @@
         }
         {
-            StrongPtr<DestroyableTest> strongPtr = NULL;
+            StrongPtr<DestroyableTest> strongPtr = nullptr;
             isNull(strongPtr);
         }
         {
             StrongPtr<DestroyableTest> strongPtr;
-            strongPtr = NULL;
-            isNull(strongPtr);
-        }
-        {
-            StrongPtr<DestroyableTest> strongPtr = 0;
+            strongPtr = nullptr;
+            isNull(strongPtr);
+        }
+        {
+            StrongPtr<DestroyableTest> strongPtr = nullptr;
             isNull(strongPtr);
         }
         {
             StrongPtr<DestroyableTest> strongPtr;
-            strongPtr = 0;
+            strongPtr = nullptr;
             isNull(strongPtr);
         }
@@ -133,11 +150,159 @@
         DestroyableTest* test = new DestroyableTest(destroyed);
         StrongPtr<DestroyableTest> strongPtr = test;
-        EXPECT_FALSE(strongPtr == NULL);
-        EXPECT_FALSE(strongPtr == 0);
+        EXPECT_FALSE(strongPtr == nullptr);
+        EXPECT_FALSE(strongPtr == nullptr);
         EXPECT_FALSE(!strongPtr);
-        EXPECT_TRUE(strongPtr != NULL);
-        EXPECT_TRUE(strongPtr != 0);
+        EXPECT_TRUE(strongPtr != nullptr);
+        EXPECT_TRUE(strongPtr != nullptr);
         EXPECT_TRUE(strongPtr);
         test->destroy();
     }
+
+    TEST(StrongPtrTest, TestConstructors)
+    {
+        bool bla;
+        DestroyableTest* test = new DestroyableTest(bla);
+
+        // default
+        StrongPtr<DestroyableTest> strongPtr1;
+        EXPECT_EQ(nullptr, strongPtr1.get());
+
+        // pointer
+        StrongPtr<DestroyableTest> strongPtr2a = test;
+        StrongPtr<DestroyableTest> strongPtr2b(test);
+        EXPECT_EQ(test, strongPtr2a.get());
+        EXPECT_EQ(test, strongPtr2b.get());
+
+        // copy
+        StrongPtr<DestroyableTest> strongPtr3a = strongPtr2a;
+        StrongPtr<DestroyableTest> strongPtr3b(strongPtr2b);
+        EXPECT_EQ(test, strongPtr3a.get());
+        EXPECT_EQ(test, strongPtr3b.get());
+
+        // move
+        StrongPtr<DestroyableTest> strongPtr4a = std::move(strongPtr3a);
+        StrongPtr<DestroyableTest> strongPtr4b(std::move(strongPtr3b));
+        EXPECT_EQ(test, strongPtr4a.get());
+        EXPECT_EQ(test, strongPtr4b.get());
+
+        // other
+        StrongPtr<Destroyable> strongPtr5a = strongPtr4a;
+        StrongPtr<Destroyable> strongPtr5b(strongPtr4b);
+        EXPECT_EQ(test, strongPtr5a.get());
+        EXPECT_EQ(test, strongPtr5b.get());
+
+        // weakPtr
+        WeakPtr<DestroyableTest> weakPtr = test;
+        StrongPtr<DestroyableTest> strongPtr6a = weakPtr;
+        StrongPtr<DestroyableTest> strongPtr6b(weakPtr);
+        EXPECT_EQ(test, strongPtr6a.get());
+        EXPECT_EQ(test, strongPtr6b.get());
+
+        // weakPtr other
+        StrongPtr<Destroyable> strongPtr7a = weakPtr;
+        StrongPtr<Destroyable> strongPtr7b(weakPtr);
+        EXPECT_EQ(test, strongPtr7a.get());
+        EXPECT_EQ(test, strongPtr7b.get());
+
+        test->destroy();
+    }
+
+    TEST(StrongPtrTest, TestAssignments)
+    {
+        bool bla;
+        DestroyableTest* test = new DestroyableTest(bla);
+
+        // pointer
+        StrongPtr<DestroyableTest> strongPtr1;
+        strongPtr1 = test;
+        EXPECT_EQ(test, strongPtr1.get());
+
+        // copy
+        StrongPtr<DestroyableTest> strongPtr2;
+        strongPtr2 = strongPtr1;
+        EXPECT_EQ(test, strongPtr2.get());
+
+        // move
+        StrongPtr<DestroyableTest> strongPtr3;
+        strongPtr3 = std::move(strongPtr2);
+        EXPECT_EQ(test, strongPtr3.get());
+
+        // other
+        StrongPtr<Destroyable> strongPtr4;
+        strongPtr4 = strongPtr3;
+        EXPECT_EQ(test, strongPtr4.get());
+
+        // weakPtr
+        WeakPtr<DestroyableTest> weakPtr = test;
+        StrongPtr<DestroyableTest> strongPtr5;
+        strongPtr5 = weakPtr;
+        EXPECT_EQ(test, strongPtr5.get());
+
+        // weakPtr other
+        StrongPtr<Destroyable> strongPtr6;
+        strongPtr6 = weakPtr;
+        EXPECT_EQ(test, strongPtr6.get());
+
+        test->destroy();
+    }
+
+    TEST(StrongPtrTest, TestStrongPtrInVector)
+    {
+        bool bla;
+        DestroyableTest* test = new DestroyableTest(bla);
+
+        std::vector<StrongPtr<DestroyableTest>> vector;
+        vector.push_back(test);
+        vector.push_back(test);
+        vector.push_back(test);
+
+        ASSERT_EQ(3, vector.size());
+        EXPECT_EQ(test, vector[0].get());
+        EXPECT_EQ(test, vector[1].get());
+        EXPECT_EQ(test, vector[2].get());
+        EXPECT_EQ(3u, test->getReferenceCount());
+
+        vector.clear();
+        EXPECT_EQ(0u, test->getReferenceCount());
+
+        test->destroy();
+    }
+
+    TEST(StrongPtrTest, TestReset)
+    {
+        bool bla;
+        DestroyableTest* test = new DestroyableTest(bla);
+        StrongPtr<DestroyableTest> strongPtr(test);
+        EXPECT_EQ(test, strongPtr.get());
+        EXPECT_EQ(1u, test->getReferenceCount());
+        strongPtr.reset();
+        EXPECT_EQ(nullptr, strongPtr.get());
+        EXPECT_EQ(0u, test->getReferenceCount());
+
+        test->destroy();
+    }
+
+    TEST(StrongPtrTest, TestSwap)
+    {
+        bool bla;
+        DestroyableTest* test1 = new DestroyableTest(bla);
+        DestroyableTest* test2 = new DestroyableTest(bla);
+
+        StrongPtr<DestroyableTest> strongPtr1(test1);
+        StrongPtr<DestroyableTest> strongPtr2(test2);
+        EXPECT_EQ(test1, strongPtr1.get());
+        EXPECT_EQ(test2, strongPtr2.get());
+        EXPECT_EQ(1u, test1->getReferenceCount());
+        EXPECT_EQ(1u, test2->getReferenceCount());
+
+        strongPtr1.swap(strongPtr2);
+
+        EXPECT_EQ(test2, strongPtr1.get());
+        EXPECT_EQ(test1, strongPtr2.get());
+        EXPECT_EQ(1u, test1->getReferenceCount());
+        EXPECT_EQ(1u, test2->getReferenceCount());
+
+        test1->destroy();
+        test2->destroy();
+    }
 }
Index: code/trunk/test/core/object/WeakPtrTest.cc
===================================================================
--- code/trunk/test/core/object/WeakPtrTest.cc	(revision 11052)
+++ code/trunk/test/core/object/WeakPtrTest.cc	(revision 11071)
@@ -1,2 +1,3 @@
+#include <utility>
 #include <gtest/gtest.h>
 #include <gmock/gmock.h>
@@ -24,4 +25,6 @@
         WeakPtr<DestroyableTest> weakPtr = test;
         EXPECT_EQ(test, weakPtr.get());
+        EXPECT_EQ(test, &(*weakPtr));
+        EXPECT_EQ(static_cast<Destroyable*>(test), weakPtr.getBase());
         test->destroy();
     }
@@ -33,5 +36,20 @@
         EXPECT_EQ(test, weakPtr.get());
         test->destroy();
-        EXPECT_EQ(NULL, weakPtr.get());
+        EXPECT_EQ(nullptr, weakPtr.get());
+    }
+
+    TEST(WeakPtrTest, CanHaveMultiplePointers)
+    {
+        DestroyableTest* test = new DestroyableTest();
+        WeakPtr<DestroyableTest> weakPtr1 = test;
+        WeakPtr<DestroyableTest> weakPtr2 = test;
+        WeakPtr<DestroyableTest> weakPtr3 = test;
+        EXPECT_EQ(test, weakPtr1.get());
+        EXPECT_EQ(test, weakPtr2.get());
+        EXPECT_EQ(test, weakPtr3.get());
+        test->destroy();
+        EXPECT_EQ(nullptr, weakPtr1.get());
+        EXPECT_EQ(nullptr, weakPtr2.get());
+        EXPECT_EQ(nullptr, weakPtr3.get());
     }
 
@@ -48,9 +66,9 @@
     void isNull(const WeakPtr<DestroyableTest> weakPtr)
     {
-        EXPECT_TRUE(weakPtr == NULL);
-        EXPECT_TRUE(weakPtr == 0);
+        EXPECT_TRUE(weakPtr == nullptr);
+        EXPECT_TRUE(weakPtr == nullptr);
         EXPECT_TRUE(!weakPtr);
-        EXPECT_FALSE(weakPtr != NULL);
-        EXPECT_FALSE(weakPtr != 0);
+        EXPECT_FALSE(weakPtr != nullptr);
+        EXPECT_FALSE(weakPtr != nullptr);
         EXPECT_FALSE(weakPtr);
     }
@@ -63,19 +81,19 @@
         }
         {
-            WeakPtr<DestroyableTest> weakPtr = NULL;
+            WeakPtr<DestroyableTest> weakPtr = nullptr;
             isNull(weakPtr);
         }
         {
             WeakPtr<DestroyableTest> weakPtr;
-            weakPtr = NULL;
-            isNull(weakPtr);
-        }
-        {
-            WeakPtr<DestroyableTest> weakPtr = 0;
+            weakPtr = nullptr;
+            isNull(weakPtr);
+        }
+        {
+            WeakPtr<DestroyableTest> weakPtr = nullptr;
             isNull(weakPtr);
         }
         {
             WeakPtr<DestroyableTest> weakPtr;
-            weakPtr = 0;
+            weakPtr = nullptr;
             isNull(weakPtr);
         }
@@ -86,11 +104,124 @@
         DestroyableTest* test = new DestroyableTest();
         WeakPtr<DestroyableTest> weakPtr = test;
-        EXPECT_FALSE(weakPtr == NULL);
-        EXPECT_FALSE(weakPtr == 0);
+        EXPECT_FALSE(weakPtr == nullptr);
+        EXPECT_FALSE(weakPtr == nullptr);
         EXPECT_FALSE(!weakPtr);
-        EXPECT_TRUE(weakPtr != NULL);
-        EXPECT_TRUE(weakPtr != 0);
+        EXPECT_TRUE(weakPtr != nullptr);
+        EXPECT_TRUE(weakPtr != nullptr);
         EXPECT_TRUE(weakPtr);
         test->destroy();
     }
+
+    TEST(WeakPtrTest, TestConstructors)
+    {
+        DestroyableTest* test = new DestroyableTest();
+
+        // default
+        WeakPtr<DestroyableTest> weakPtr1;
+        EXPECT_EQ(nullptr, weakPtr1.get());
+
+        // pointer
+        WeakPtr<DestroyableTest> weakPtr2a = test;
+        WeakPtr<DestroyableTest> weakPtr2b(test);
+        EXPECT_EQ(test, weakPtr2a.get());
+        EXPECT_EQ(test, weakPtr2b.get());
+
+        // copy
+        WeakPtr<DestroyableTest> weakPtr3a = weakPtr2a;
+        WeakPtr<DestroyableTest> weakPtr3b(weakPtr2b);
+        EXPECT_EQ(test, weakPtr3a.get());
+        EXPECT_EQ(test, weakPtr3b.get());
+
+        // move
+        WeakPtr<DestroyableTest> weakPtr4a = std::move(weakPtr3a);
+        WeakPtr<DestroyableTest> weakPtr4b(std::move(weakPtr3b));
+        EXPECT_EQ(test, weakPtr4a.get());
+        EXPECT_EQ(test, weakPtr4b.get());
+
+        // other
+        WeakPtr<Destroyable> weakPtr5a = weakPtr4a;
+        WeakPtr<Destroyable> weakPtr5b(weakPtr4b);
+        EXPECT_EQ(test, weakPtr5a.get());
+        EXPECT_EQ(test, weakPtr5b.get());
+
+        test->destroy();
+    }
+
+    TEST(WeakPtrTest, TestAssignments)
+    {
+        DestroyableTest* test = new DestroyableTest();
+
+        // pointer
+        WeakPtr<DestroyableTest> weakPtr1;
+        weakPtr1 = test;
+        EXPECT_EQ(test, weakPtr1.get());
+
+        // copy
+        WeakPtr<DestroyableTest> weakPtr2;
+        weakPtr2 = weakPtr1;
+        EXPECT_EQ(test, weakPtr2.get());
+
+        // move
+        WeakPtr<DestroyableTest> weakPtr3;
+        weakPtr3 = std::move(weakPtr2);
+        EXPECT_EQ(test, weakPtr3.get());
+
+        // other
+        WeakPtr<Destroyable> weakPtr4;
+        weakPtr4 = weakPtr3;
+        EXPECT_EQ(test, weakPtr4.get());
+
+        test->destroy();
+    }
+
+    TEST(WeakPtrTest, TestWeakPtrInVector)
+    {
+        DestroyableTest* test = new DestroyableTest();
+
+        std::vector<WeakPtr<DestroyableTest>> vector;
+        vector.push_back(test);
+        vector.push_back(test);
+        vector.push_back(test);
+
+        ASSERT_EQ(3, vector.size());
+        EXPECT_EQ(test, vector[0].get());
+        EXPECT_EQ(test, vector[1].get());
+        EXPECT_EQ(test, vector[2].get());
+
+        test->destroy();
+
+        EXPECT_EQ(nullptr, vector[0].get());
+        EXPECT_EQ(nullptr, vector[1].get());
+        EXPECT_EQ(nullptr, vector[2].get());
+    }
+
+    TEST(WeakPtrTest, TestReset)
+    {
+        DestroyableTest* test = new DestroyableTest();
+        WeakPtr<DestroyableTest> weakPtr(test);
+        EXPECT_EQ(test, weakPtr.get());
+        weakPtr.reset();
+        EXPECT_EQ(nullptr, weakPtr.get());
+
+        test->destroy();
+    }
+
+    TEST(WeakPtrTest, TestSwap)
+    {
+        DestroyableTest* test1 = new DestroyableTest();
+        DestroyableTest* test2 = new DestroyableTest();
+
+        WeakPtr<DestroyableTest> weakPtr1(test1);
+        WeakPtr<DestroyableTest> weakPtr2(test2);
+        EXPECT_EQ(test1, weakPtr1.get());
+        EXPECT_EQ(test2, weakPtr2.get());
+
+        weakPtr1.swap(weakPtr2);
+
+        EXPECT_EQ(test2, weakPtr1.get());
+        EXPECT_EQ(test1, weakPtr2.get());
+
+        test1->destroy();
+        test2->destroy();
+    }
 }
Index: code/trunk/test/core/singleton/ScopeTest.cc
===================================================================
--- code/trunk/test/core/singleton/ScopeTest.cc	(revision 11052)
+++ code/trunk/test/core/singleton/ScopeTest.cc	(revision 11071)
@@ -26,5 +26,5 @@
         {
             public:
-                virtual void SetUp()
+                virtual void SetUp() override
                 {
                     new IdentifierManager();
@@ -32,8 +32,8 @@
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
                     ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::SCOPED_SINGLETON_WRAPPER);
-                    Context::setRootContext(new Context(NULL));
+                    Context::setRootContext(new Context(nullptr));
                 }
 
-                virtual void TearDown()
+                virtual void TearDown() override
                 {
                     Context::destroyRootContext();
