Index: src/UIElements/Menu/unittests/Makefile.am
===================================================================
--- src/UIElements/Menu/unittests/Makefile.am	(revision 137ae140606b0df28861bb9c9f5359feb7c1bac3)
+++ src/UIElements/Menu/unittests/Makefile.am	(revision dda246d334045cb752f130960f92fe011e0d85b8)
@@ -8,5 +8,6 @@
 
 TESTS = \
-  MenuDescriptionUnitTest
+  MenuDescriptionUnitTest \
+  MenuDescription_ActionRegistry_ConsistencyUnitTest
 
 
@@ -22,6 +23,24 @@
 	MenuDescriptionUnitTest.cpp \
 	MenuDescriptionUnitTest.hpp \
-	../MenuDescription.cpp
+	../MenuDescription.cpp \
+	../MenuDescription.hpp
 MenuDescriptionUnitTest_LDADD = $(MENULIBS)
 
+MenuDescription_ActionRegistry_ConsistencyUnitTest_SOURCES =  $(top_srcdir)/src/unittests/UnitTestMain.cpp \
+	MenuDescription_ActionRegistry_ConsistencyUnitTest.cpp \
+	MenuDescription_ActionRegistry_ConsistencyUnitTest.hpp
+MenuDescription_ActionRegistry_ConsistencyUnitTest_LDADD = \
+  ../../libMolecuilderUI.la \
+  ../../../Actions/libMolecuilderActions.la \
+	../../../Graph/libMolecuilderGraph.la \
+	../../../libMolecuilder.la \
+	../../../Parser/libMolecuilderParser.la \
+	../../../Shapes/libMolecuilderShapes.la \
+	../../../LinearAlgebra/libMolecuilderLinearAlgebra.la \
+	../../../Exceptions/libMolecuilderExceptions.la \
+	../../../RandomNumbers/libMolecuilderRandomNumbers.la \
+	${CodePatterns_LIBS} \
+	$(BOOST_LIB)
+
+
 #AUTOMAKE_OPTIONS = parallel-tests
Index: src/UIElements/Menu/unittests/MenuDescription_ActionRegistry_ConsistencyUnitTest.cpp
===================================================================
--- src/UIElements/Menu/unittests/MenuDescription_ActionRegistry_ConsistencyUnitTest.cpp	(revision dda246d334045cb752f130960f92fe011e0d85b8)
+++ src/UIElements/Menu/unittests/MenuDescription_ActionRegistry_ConsistencyUnitTest.cpp	(revision dda246d334045cb752f130960f92fe011e0d85b8)
@@ -0,0 +1,85 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2010 University of Bonn. All rights reserved.
+ * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
+ */
+
+/*
+ * MenuDescription_ActionRegistry_ConsistencyUnitTest.cpp
+ *
+ *  Created on: Nov 25, 2009
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+using namespace std;
+
+#include <cppunit/CompilerOutputter.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/ui/text/TestRunner.h>
+
+#include "Actions/Action.hpp"
+#include "Actions/ActionRegistry.hpp"
+#include "Actions/ActionTraits.hpp"
+
+#include "MenuDescription_ActionRegistry_ConsistencyUnitTest.hpp"
+
+#ifdef HAVE_TESTRUNNER
+#include "UnitTestMain.hpp"
+#endif /*HAVE_TESTRUNNER*/
+
+/********************************************** Test classes **************************************/
+
+// Registers the fixture into the 'registry'
+CPPUNIT_TEST_SUITE_REGISTRATION( MenuDescription_ActionRegistry_ConsistencyTest );
+
+
+void MenuDescription_ActionRegistry_ConsistencyTest::setUp()
+{
+  AR = ActionRegistry::getPointer();
+};
+
+
+void MenuDescription_ActionRegistry_ConsistencyTest::tearDown()
+{
+  ActionRegistry::purgeInstance();
+};
+
+/** UnitTest for consistency.
+ * we check that we have the same keys in each of MenuSet, MenuDescription and MenuNameMap.
+ */
+void MenuDescription_ActionRegistry_ConsistencyTest::ConsistencyCheck()
+{
+  std::set <std::string> MenuNames_from_ActionRegistry;
+
+  // go through all Actions and gather menu names
+  for (ActionRegistry::const_iterator iter = AR->getBeginIter();
+      iter != AR->getEndIter();
+      ++iter) {
+    const std::string &MenuName = (iter->second)->Traits.getMenuName();
+    MenuNames_from_ActionRegistry.insert(MenuName);
+  }
+
+  for (std::set <std::string>::const_iterator ARiter = MenuNames_from_ActionRegistry.begin();
+      ARiter != MenuNames_from_ActionRegistry.end();
+      ++ARiter) {
+    std::string const MenuName = *ARiter;
+    CPPUNIT_ASSERT_MESSAGE(MenuName
+        +" cannot be found in the MenuDescription::MenuDescriptionsMap.\n"
+        +"Have you added an entry to MenuDescriptionsMap of MenuDescription for this menu?",
+        md.MenuDescriptionsMap->count(MenuName));
+    CPPUNIT_ASSERT_MESSAGE(MenuName
+        +" cannot be found in the MenuDescription::MenuPositionMap.\n"
+        +"Have you added an entry to MenuPositionMap of MenuDescription for this menu?",
+        md.MenuPositionMap->count(MenuName));
+    CPPUNIT_ASSERT_MESSAGE(MenuName
+        +" cannot be found in the MenuDescription::MenuNameMap.\n"
+        +"Have you added an entry to MenuNameMap of MenuDescription for this menu?",
+        md.MenuNameMap->count(MenuName));
+  }
+};
Index: src/UIElements/Menu/unittests/MenuDescription_ActionRegistry_ConsistencyUnitTest.hpp
===================================================================
--- src/UIElements/Menu/unittests/MenuDescription_ActionRegistry_ConsistencyUnitTest.hpp	(revision dda246d334045cb752f130960f92fe011e0d85b8)
+++ src/UIElements/Menu/unittests/MenuDescription_ActionRegistry_ConsistencyUnitTest.hpp	(revision dda246d334045cb752f130960f92fe011e0d85b8)
@@ -0,0 +1,41 @@
+/*
+ * MenuDescription_ActionRegistry_ConsistencyUnitTest.hpp
+ *
+ *  Created on: Nov 25, 2009
+ *      Author: heber
+ */
+
+#ifndef MENUDESCRIPTION_ACTIONREGISTRY_CONSISTENCYUNITTEST_HPP_
+#define MENUDESCRIPTION_ACTIONREGISTRY_CONSISTENCYUNITTEST_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+
+#include <cppunit/extensions/HelperMacros.h>
+
+#include "UIElements/Menu/MenuDescription.hpp"
+
+class ActionRegistry;
+
+/********************************************** Test classes **************************************/
+
+class MenuDescription_ActionRegistry_ConsistencyTest : public CppUnit::TestFixture
+{
+    CPPUNIT_TEST_SUITE( MenuDescription_ActionRegistry_ConsistencyTest) ;
+    CPPUNIT_TEST ( ConsistencyCheck );
+    CPPUNIT_TEST_SUITE_END();
+
+public:
+      void setUp();
+      void tearDown();
+      void ConsistencyCheck();
+
+private:
+      MenuDescription md;
+      ActionRegistry *AR;
+};
+
+#endif /* MENUDESCRIPTION_ACTIONREGISTRY_CONSISTENCYUNITTEST_HPP_ */
