Index: code/branches/testing/src/libraries/util/output/OutputStream.h
===================================================================
--- code/branches/testing/src/libraries/util/output/OutputStream.h	(revision 9528)
+++ code/branches/testing/src/libraries/util/output/OutputStream.h	(revision 9529)
@@ -102,4 +102,7 @@
             }
 
+            inline const OutputLevel getOutputLevel() const { return this->level_; }
+            inline const OutputContextContainer* getOutputContext() const { return this->context_; }
+
         private:
             /// @brief Generic function to add values to the output stream, using the inherited << operator from std::ostringstream.
Index: code/branches/testing/test/util/CMakeLists.txt
===================================================================
--- code/branches/testing/test/util/CMakeLists.txt	(revision 9528)
+++ code/branches/testing/test/util/CMakeLists.txt	(revision 9529)
@@ -12,4 +12,5 @@
     mboolTest.cc
     MultiTypeTest.cc
+    OutputTest.cc
     ScopeTest.cc
     SharedPtrTest.cc
@@ -19,4 +20,14 @@
     SubStringTest.cc
     VA_NARGSTest.cc
+
+    output/BaseWriterTest.cc
+    output/ConsoleWriterTest.cc
+    output/LogWriterTest.cc
+    output/MemoryWriterTest.cc
+    output/OutputDefinitionsTest.cc
+    output/OutputListenerTest.cc
+    output/OutputManagerTest.cc
+    output/OutputStreamTest.cc
+    output/SubcontextOutputListenerTest.cc
 )
 ADD_DEPENDENCIES(test util_test)
Index: code/branches/testing/test/util/OutputTest.cc
===================================================================
--- code/branches/testing/test/util/OutputTest.cc	(revision 9529)
+++ code/branches/testing/test/util/OutputTest.cc	(revision 9529)
@@ -0,0 +1,49 @@
+#include <gtest/gtest.h>
+#include "util/Output.h"
+
+namespace orxonox
+{
+    namespace context
+    {
+        namespace
+        {
+            REGISTER_OUTPUT_CONTEXT(unittest);
+        }
+    }
+
+    TEST(Output, CanUseOrxout)
+    {
+        orxout() << "test" << endl;
+    }
+
+    TEST(Output, OrxoutUsesCorrectOutputLevel)
+    {
+        {
+            const OutputStream& stream = orxout(internal_warning);
+            EXPECT_EQ(internal_warning, stream.getOutputLevel());
+        }
+
+        {
+            const OutputStream& stream = orxout(debug_output);
+            EXPECT_EQ(debug_output, stream.getOutputLevel());
+        }
+    }
+
+    TEST(Output, OrxoutUsesCorrectOutputContext)
+    {
+        const OutputStream& stream = orxout(verbose, context::unittest());
+        EXPECT_EQ(verbose, stream.getOutputLevel());
+        EXPECT_EQ(context::unittest().mask, stream.getOutputContext()->mask);
+        EXPECT_EQ(context::unittest().name, stream.getOutputContext()->name);
+        EXPECT_EQ(context::unittest().sub_id, stream.getOutputContext()->sub_id);
+    }
+
+    TEST(Output, OrxoutAcceptsFunctionPointer)
+    {
+        const OutputStream& stream = orxout(verbose, context::unittest);
+        EXPECT_EQ(verbose, stream.getOutputLevel());
+        EXPECT_EQ(context::unittest().mask, stream.getOutputContext()->mask);
+        EXPECT_EQ(context::unittest().name, stream.getOutputContext()->name);
+        EXPECT_EQ(context::unittest().sub_id, stream.getOutputContext()->sub_id);
+    }
+}
Index: code/branches/testing/test/util/output/BaseWriterTest.cc
===================================================================
--- code/branches/testing/test/util/output/BaseWriterTest.cc	(revision 9529)
+++ code/branches/testing/test/util/output/BaseWriterTest.cc	(revision 9529)
@@ -0,0 +1,6 @@
+#include <gtest/gtest.h>
+#include "util/Output.h"
+
+namespace orxonox
+{
+}
Index: code/branches/testing/test/util/output/ConsoleWriterTest.cc
===================================================================
--- code/branches/testing/test/util/output/ConsoleWriterTest.cc	(revision 9529)
+++ code/branches/testing/test/util/output/ConsoleWriterTest.cc	(revision 9529)
@@ -0,0 +1,6 @@
+#include <gtest/gtest.h>
+#include "util/Output.h"
+
+namespace orxonox
+{
+}
Index: code/branches/testing/test/util/output/LogWriterTest.cc
===================================================================
--- code/branches/testing/test/util/output/LogWriterTest.cc	(revision 9529)
+++ code/branches/testing/test/util/output/LogWriterTest.cc	(revision 9529)
@@ -0,0 +1,6 @@
+#include <gtest/gtest.h>
+#include "util/Output.h"
+
+namespace orxonox
+{
+}
Index: code/branches/testing/test/util/output/MemoryWriterTest.cc
===================================================================
--- code/branches/testing/test/util/output/MemoryWriterTest.cc	(revision 9529)
+++ code/branches/testing/test/util/output/MemoryWriterTest.cc	(revision 9529)
@@ -0,0 +1,6 @@
+#include <gtest/gtest.h>
+#include "util/Output.h"
+
+namespace orxonox
+{
+}
Index: code/branches/testing/test/util/output/OutputDefinitionsTest.cc
===================================================================
--- code/branches/testing/test/util/output/OutputDefinitionsTest.cc	(revision 9529)
+++ code/branches/testing/test/util/output/OutputDefinitionsTest.cc	(revision 9529)
@@ -0,0 +1,10 @@
+#include <gtest/gtest.h>
+#include "util/Output.h"
+
+namespace orxonox
+{
+    TEST(OutputDefinitions, Levels)
+    {
+        EXPECT_EQ(0x0000, level::none);
+    }
+}
Index: code/branches/testing/test/util/output/OutputListenerTest.cc
===================================================================
--- code/branches/testing/test/util/output/OutputListenerTest.cc	(revision 9529)
+++ code/branches/testing/test/util/output/OutputListenerTest.cc	(revision 9529)
@@ -0,0 +1,157 @@
+#include <gtest/gtest.h>
+#include <gmock/gmock.h>
+#include "util/output/OutputListener.h"
+
+namespace orxonox
+{
+    namespace context
+    {
+        namespace
+        {
+            REGISTER_OUTPUT_CONTEXT(unittest1);
+            REGISTER_OUTPUT_CONTEXT(unittest2);
+            REGISTER_OUTPUT_CONTEXT(unittest3);
+        }
+    }
+
+    namespace
+    {
+        class MockOutputListener : public OutputListener
+        {
+            public:
+                MOCK_METHOD3(output, void(OutputLevel, const OutputContextContainer&, const std::vector<std::string>&));
+        };
+    }
+
+    // test default settings
+    TEST(OutputListener, DefaultConstructorAcceptsNothing)
+    {
+        MockOutputListener listener;
+
+        EXPECT_EQ(level::none, listener.getLevelMask());
+        EXPECT_EQ(level::none, listener.getAdditionalContextsLevelMask());
+        EXPECT_EQ(context::none, listener.getAdditionalContextsMask());
+    }
+
+    // test setLevelMax
+    TEST(OutputListener, TestSetLevelMax)
+    {
+        MockOutputListener listener;
+
+        listener.setLevelMax(level::user_warning);
+
+        OutputLevel mask = listener.getLevelMask();
+
+        EXPECT_FALSE(mask & level::none);
+        EXPECT_TRUE(mask & level::message);
+        EXPECT_TRUE(mask & level::debug_output);
+        EXPECT_TRUE(mask & level::user_error);
+        EXPECT_TRUE(mask & level::user_warning);
+        EXPECT_FALSE(mask & level::user_status);
+    }
+
+    // test setLevelRange
+    TEST(OutputListener, TestSetLevelRange)
+    {
+        MockOutputListener listener;
+
+        listener.setLevelRange(level::debug_output, level::user_warning);
+
+        OutputLevel mask = listener.getLevelMask();
+
+        EXPECT_FALSE(mask & level::none);
+        EXPECT_FALSE(mask & level::message);
+        EXPECT_TRUE(mask & level::debug_output);
+        EXPECT_TRUE(mask & level::user_error);
+        EXPECT_TRUE(mask & level::user_warning);
+        EXPECT_FALSE(mask & level::user_status);
+    }
+
+    // test setLevelMask
+    TEST(OutputListener, TestSetLevelMask)
+    {
+        MockOutputListener listener;
+
+        listener.setLevelMask(static_cast<OutputLevel>(level::debug_output | level::user_warning));
+
+        OutputLevel mask = listener.getLevelMask();
+
+        EXPECT_FALSE(mask & level::none);
+        EXPECT_FALSE(mask & level::message);
+        EXPECT_TRUE(mask & level::debug_output);
+        EXPECT_FALSE(mask & level::user_error);
+        EXPECT_TRUE(mask & level::user_warning);
+        EXPECT_FALSE(mask & level::user_status);
+    }
+
+    // test setAdditionalContextsLevelMax
+    TEST(OutputListener, TestSetAdditionalContextsLevelMax)
+    {
+        MockOutputListener listener;
+
+        listener.setAdditionalContextsLevelMax(level::user_warning);
+
+        OutputLevel mask = listener.getAdditionalContextsLevelMask();
+
+        EXPECT_FALSE(mask & level::none);
+        EXPECT_TRUE(mask & level::message);
+        EXPECT_TRUE(mask & level::debug_output);
+        EXPECT_TRUE(mask & level::user_error);
+        EXPECT_TRUE(mask & level::user_warning);
+        EXPECT_FALSE(mask & level::user_status);
+    }
+
+    // test setAdditionalContextsLevelRange
+    TEST(OutputListener, TestSetAdditionalContextsLevelRange)
+    {
+        MockOutputListener listener;
+
+        listener.setAdditionalContextsLevelRange(level::debug_output, level::user_warning);
+
+        OutputLevel mask = listener.getAdditionalContextsLevelMask();
+
+        EXPECT_FALSE(mask & level::none);
+        EXPECT_FALSE(mask & level::message);
+        EXPECT_TRUE(mask & level::debug_output);
+        EXPECT_TRUE(mask & level::user_error);
+        EXPECT_TRUE(mask & level::user_warning);
+        EXPECT_FALSE(mask & level::user_status);
+    }
+
+    // test setAdditionalContextsLevelMask
+    TEST(OutputListener, TestSetAdditionalContextsLevelMask)
+    {
+        MockOutputListener listener;
+
+        listener.setAdditionalContextsLevelMask(static_cast<OutputLevel>(level::debug_output | level::user_warning));
+
+        OutputLevel mask = listener.getAdditionalContextsLevelMask();
+
+        EXPECT_FALSE(mask & level::none);
+        EXPECT_FALSE(mask & level::message);
+        EXPECT_TRUE(mask & level::debug_output);
+        EXPECT_FALSE(mask & level::user_error);
+        EXPECT_TRUE(mask & level::user_warning);
+        EXPECT_FALSE(mask & level::user_status);
+    }
+
+    // test setAdditionalContextsMask
+    TEST(OutputListener, TestSetAdditionalContextsMask)
+    {
+        MockOutputListener listener;
+
+        listener.setAdditionalContextsMask(context::unittest1().mask | context::unittest3().mask);
+
+        OutputContextMask mask = listener.getAdditionalContextsMask();
+
+        EXPECT_TRUE(mask & context::unittest1().mask);
+        EXPECT_FALSE(mask & context::unittest2().mask);
+        EXPECT_TRUE(mask & context::unittest3().mask);
+    }
+
+    // test setAdditionalContextsLevelMask calls OutputManager::updateCombinedAdditionalContextsLevelMask
+    // test setAdditionalContextsMask calls OutputManager::updateCombinedAdditionalContextsMask
+
+    // test acceptsOutput
+    // test unfilteredOutput
+}
Index: code/branches/testing/test/util/output/OutputManagerTest.cc
===================================================================
--- code/branches/testing/test/util/output/OutputManagerTest.cc	(revision 9529)
+++ code/branches/testing/test/util/output/OutputManagerTest.cc	(revision 9529)
@@ -0,0 +1,6 @@
+#include <gtest/gtest.h>
+#include "util/Output.h"
+
+namespace orxonox
+{
+}
Index: code/branches/testing/test/util/output/OutputStreamTest.cc
===================================================================
--- code/branches/testing/test/util/output/OutputStreamTest.cc	(revision 9529)
+++ code/branches/testing/test/util/output/OutputStreamTest.cc	(revision 9529)
@@ -0,0 +1,6 @@
+#include <gtest/gtest.h>
+#include "util/Output.h"
+
+namespace orxonox
+{
+}
Index: code/branches/testing/test/util/output/SubcontextOutputListenerTest.cc
===================================================================
--- code/branches/testing/test/util/output/SubcontextOutputListenerTest.cc	(revision 9529)
+++ code/branches/testing/test/util/output/SubcontextOutputListenerTest.cc	(revision 9529)
@@ -0,0 +1,6 @@
+#include <gtest/gtest.h>
+#include "util/Output.h"
+
+namespace orxonox
+{
+}
