Index: tests/SystemQueue-tests.cc
===================================================================
--- tests/SystemQueue-tests.cc	(revision 12765)
+++ tests/SystemQueue-tests.cc	(revision 12771)
@@ -94,4 +94,11 @@
         cout << "### Check ### "<< endl;
 
+        checkmark = true;
+    }
+
+    void CheckThread()
+    {
+        EXPECT_TRUE( SystemQueue::instance().am_I_in_the_SysQ_thread() );
+        
         checkmark = true;
     }
@@ -345,4 +352,27 @@
 }
 
+
+TEST_F(SystemQueueTest, ThreadDetection)
+{
+    SystemQueue& sysq = SystemQueue::instance();
+    
+    // start
+    sysq.run();
+    
+    EXPECT_FALSE( sysq.am_I_in_the_SysQ_thread() );
+    
+    // scheduleCall
+    sysq.scheduleCall(
+        boost::bind(&SystemQueueTest::CheckThread, this)
+    );
+    
+    wait_for_checkmark(MAX_WAIT);
+    
+    sysq.cancel();
+    
+    EXPECT_TRUE( checkmark ) << "WARNING! One of the test functions was not called at all!";
+}
+
+
 /**
  *  schedule multiple calls
