Index: src/Fragmentation/Summation/unittests/Makefile.am
===================================================================
--- src/Fragmentation/Summation/unittests/Makefile.am	(revision c6ca23fe871942ffe00849bb181ca2fe88d7bc94)
+++ src/Fragmentation/Summation/unittests/Makefile.am	(revision c40e15d6697957957c2cc47a2cd1f72c7a539eae)
@@ -8,5 +8,6 @@
 	../Fragmentation/Summation/unittests/SetValueUnitTest.cpp \
 	../Fragmentation/Summation/unittests/SetValueMapUnitTest.cpp \
-	../Fragmentation/Summation/unittests/SubsetMapUnitTest.cpp
+	../Fragmentation/Summation/unittests/SubsetMapUnitTest.cpp \
+	../Fragmentation/Summation/unittests/SummationUnitTest.cpp
 
 FRAGMENTATIONSUMMATIONTESTSHEADERS = \
@@ -16,5 +17,6 @@
 	../Fragmentation/Summation/unittests/SetValueUnitTest.hpp \
 	../Fragmentation/Summation/unittests/SetValueMapUnitTest.hpp \
-	../Fragmentation/Summation/unittests/SubsetMapUnitTest.hpp
+	../Fragmentation/Summation/unittests/SubsetMapUnitTest.hpp \
+	../Fragmentation/Summation/unittests/SummationUnitTest.hpp
 
 FRAGMENTATIONSUMMATIONTESTS = \
@@ -24,5 +26,6 @@
   SetValueUnitTest \
   SetValueMapUnitTest \
-  SubsetMapUnitTest
+  SubsetMapUnitTest \
+  SummationUnitTest
 
 TESTS += $(FRAGMENTATIONSUMMATIONTESTS)
@@ -70,4 +73,11 @@
 SubsetMapUnitTest_LDADD = ${FRAGMENTATIONSUMMATIONLIBS}
 
+SummationUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
+	../Fragmentation/Summation/unittests/SummationUnitTest.cpp \
+	../Fragmentation/Summation/unittests/SummationUnitTest.hpp \
+	../Fragmentation/Summation/Summation.hpp \
+	../Fragmentation/Summation/Summation_impl.hpp
+SummationUnitTest_LDADD = ${FRAGMENTATIONSUMMATIONLIBS}
+
 
 #AUTOMAKE_OPTIONS = parallel-tests
Index: src/Fragmentation/Summation/unittests/SummationUnitTest.cpp
===================================================================
--- src/Fragmentation/Summation/unittests/SummationUnitTest.cpp	(revision c40e15d6697957957c2cc47a2cd1f72c7a539eae)
+++ src/Fragmentation/Summation/unittests/SummationUnitTest.cpp	(revision c40e15d6697957957c2cc47a2cd1f72c7a539eae)
@@ -0,0 +1,109 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2012 University of Bonn. All rights reserved.
+ * 
+ *
+ *   This file is part of MoleCuilder.
+ *
+ *    MoleCuilder is free software: you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation, either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    MoleCuilder is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with MoleCuilder.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * SummationUnitTest.cpp
+ *
+ *  Created on: Jun 30, 2012
+ *      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 "SummationUnitTest.hpp"
+
+#include "Fragmentation/Summation/Summation.hpp"
+#include "Fragmentation/Summation/SetValue.hpp"
+
+#include <algorithm>
+#include <boost/assign.hpp>
+
+#include "CodePatterns/Log.hpp"
+
+#ifdef HAVE_TESTRUNNER
+#include "UnitTestMain.hpp"
+#endif /*HAVE_TESTRUNNER*/
+
+using namespace boost::assign;
+
+/********************************************** Test classes **************************************/
+
+// Registers the fixture into the 'registry'
+CPPUNIT_TEST_SUITE_REGISTRATION( SummationTest );
+
+void SummationTest::setUp()
+{
+  // failing asserts should be thrown
+  ASSERT_DO(Assert::Throw);
+
+  setVerbosity(5);
+
+  // create a tree of sets
+  IndexSet::ptr AllIndices(new IndexSet);
+  (*AllIndices) += 1,2,3,4;
+  CPPUNIT_ASSERT_EQUAL( (size_t)4, AllIndices->size() );
+  container.reset(new IndexSetContainer(AllIndices));
+  CPPUNIT_ASSERT_EQUAL( (size_t)1, container->getContainer().size() );
+  IndexSet tempset;
+  tempset += 1;
+  container->insert(tempset);
+  tempset += 2;
+  container->insert(tempset);
+  tempset.clear();
+  tempset += 3;
+  container->insert(tempset);
+  tempset += 2;
+  container->insert(tempset);
+  CPPUNIT_ASSERT_EQUAL( (size_t)5, container->getContainer().size() );
+  subsetmap.reset(new SubsetMap(*container));
+}
+
+
+void SummationTest::tearDown()
+{
+}
+
+/** UnitTest for operator()
+ */
+void SummationTest::operator_staticTest()
+{
+  const IndexSetContainer::Container_t &_container = container->getContainer();
+  for (int value = -5; value <= 5; ++value) {
+    // create a value for each set (and copy indices to overcome constness in container)
+    Summation<int>::InputSets_t indices(_container.begin(), _container.end());
+    Summation<int>::InputValues_t values(_container.size(), value);
+    // create the summation functor
+    Summation<int> OS(indices, values, subsetmap);
+
+    // sum up, as full set is contained we must get value again
+    CPPUNIT_ASSERT_EQUAL( (int)(value * _container.size()), OS() );
+  }
+}
Index: src/Fragmentation/Summation/unittests/SummationUnitTest.hpp
===================================================================
--- src/Fragmentation/Summation/unittests/SummationUnitTest.hpp	(revision c40e15d6697957957c2cc47a2cd1f72c7a539eae)
+++ src/Fragmentation/Summation/unittests/SummationUnitTest.hpp	(revision c40e15d6697957957c2cc47a2cd1f72c7a539eae)
@@ -0,0 +1,41 @@
+/*
+ * SummationUnitTest.hpp
+ *
+ *  Created on: Jun 30, 2012
+ *      Author: heber
+ */
+
+#ifndef SUMMATIONUNITTEST_HPP_
+#define SUMMATIONUNITTEST_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+
+#include <cppunit/extensions/HelperMacros.h>
+
+#include "Fragmentation/Summation/IndexSetContainer.hpp"
+#include "Fragmentation/Summation/SubsetMap.hpp"
+
+
+/********************************************** Test classes **************************************/
+
+class SummationTest : public CppUnit::TestFixture
+{
+    CPPUNIT_TEST_SUITE( SummationTest) ;
+    CPPUNIT_TEST ( operator_staticTest );
+    CPPUNIT_TEST_SUITE_END();
+
+public:
+      void setUp();
+      void tearDown();
+      void operator_staticTest();
+
+private:
+      SubsetMap::ptr subsetmap;
+      IndexSetContainer::ptr container;
+};
+
+#endif /* SUMMATIONUNITTEST_HPP_ */
