Index: src/Potentials/unittests/Makefile.am
===================================================================
--- src/Potentials/unittests/Makefile.am	(revision 6efcaec4b6119396e4609fd8ec76dda69a50c32f)
+++ src/Potentials/unittests/Makefile.am	(revision 6efcaec4b6119396e4609fd8ec76dda69a50c32f)
@@ -0,0 +1,32 @@
+# PLEASE adhere to the alphabetical ordering in this Makefile!
+# Also indentation by a single tab
+
+POTENTIALSTESTSSOURCES = \
+	../Potentials/unittests/SerializablePotentialUnitTest.cpp
+
+POTENTIALSTESTSHEADERS = \
+	../Potentials/unittests/SerializablePotentialUnitTest.hpp
+
+POTENTIALSTESTS = \
+	SerializablePotentialUnitTest
+
+TESTS += $(POTENTIALSTESTS)
+check_PROGRAMS += $(POTENTIALSTESTS) 
+noinst_PROGRAMS += $(POTENTIALSTESTS)
+
+POTENTIALSLIBS = \
+	../libMolecuilderPotentials.la \
+	$(top_builddir)/LinearAlgebra/src/LinearAlgebra/libLinearAlgebra.la \
+	${CodePatterns_LIBS} \
+  $(BOOST_SERIALIZATION_LDFLAGS) $(BOOST_SERIALIZATION_LIBS) \
+	$(BOOST_LIB)
+
+SerializablePotentialUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
+	../Potentials/unittests/SerializablePotentialUnitTest.cpp \
+	../Potentials/unittests/SerializablePotentialUnitTest.hpp \
+	../Potentials/unittests/stubs/SerializablePotentialMock.cpp \
+	../Potentials/unittests/stubs/SerializablePotentialMock.hpp
+SerializablePotentialUnitTest_LDADD = ${POTENTIALSLIBS}
+
+
+#AUTOMAKE_OPTIONS = parallel-tests
Index: src/Potentials/unittests/SerializablePotentialUnitTest.cpp
===================================================================
--- src/Potentials/unittests/SerializablePotentialUnitTest.cpp	(revision 6efcaec4b6119396e4609fd8ec76dda69a50c32f)
+++ src/Potentials/unittests/SerializablePotentialUnitTest.cpp	(revision 6efcaec4b6119396e4609fd8ec76dda69a50c32f)
@@ -0,0 +1,123 @@
+/*
+ * 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/>.
+ */
+
+/*
+ * SerializablePotentialUnitTest.cpp
+ *
+ *  Created on: Nov 23, 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 "SerializablePotentialUnitTest.hpp"
+
+#include <boost/assign.hpp>
+#include <sstream>
+
+#include "CodePatterns/Assert.hpp"
+
+#include "Potentials/Exceptions.hpp"
+#include "Potentials/SerializablePotential.hpp"
+
+using namespace boost::assign;
+
+#ifdef HAVE_TESTRUNNER
+#include "UnitTestMain.hpp"
+#endif /*HAVE_TESTRUNNER*/
+
+/********************************************** Test classes **************************************/
+
+// Registers the fixture into the 'registry'
+CPPUNIT_TEST_SUITE_REGISTRATION( SerializablePotentialTest );
+
+
+void SerializablePotentialTest::setUp()
+{
+  // failing asserts should be thrown
+  ASSERT_DO(Assert::Throw);
+}
+
+
+void SerializablePotentialTest::tearDown()
+{
+}
+
+/** UnitTest for operator<<()
+ */
+void SerializablePotentialTest::outputTest()
+{
+  {
+  std::stringstream outstream;
+  CPPUNIT_ASSERT_NO_THROW(outstream << mockpotential);
+  CPPUNIT_ASSERT_EQUAL(
+      std::string("serializablepotentialmock:\tparticle_type1=1,\tdummy_constant=0;"),
+      outstream.str()
+      );
+  }
+}
+
+/** UnitTest for derivative>>()
+ */
+void SerializablePotentialTest::inputTest()
+{
+  {
+    std::stringstream instream(
+        std::string("\tserializablepotentialmock:\tparticle_type1=1,\tdummy_constant=1;")
+    );
+    CPPUNIT_ASSERT_NO_THROW(instream >> mockpotential);
+    CPPUNIT_ASSERT_EQUAL(
+        SerializablePotential::parameter_t(1),
+        mockpotential.getParameters()[0]);
+  }
+  {
+    std::stringstream illegalkeystream(
+        std::string("\tserializablepotentialmock:\tparticle_type1=1,\tdummy_wrong=0;")
+    );
+    CPPUNIT_ASSERT_THROW(
+        illegalkeystream >> mockpotential,
+        SerializablePotentialIllegalKeyException);
+    CPPUNIT_ASSERT_EQUAL(
+        SerializablePotential::parameter_t(1),
+        mockpotential.getParameters()[0]);
+  }
+  {
+    std::stringstream missingvaluestream(
+        std::string("\tserializablepotentialmock:\tparticle_type1=1,\tdummy_constant;")
+    );
+    CPPUNIT_ASSERT_THROW(
+        missingvaluestream >> mockpotential,
+        SerializablePotentialMissingValueException);
+    CPPUNIT_ASSERT_EQUAL(
+        SerializablePotential::parameter_t(1),
+        mockpotential.getParameters()[0]);
+  }
+}
Index: src/Potentials/unittests/SerializablePotentialUnitTest.hpp
===================================================================
--- src/Potentials/unittests/SerializablePotentialUnitTest.hpp	(revision 6efcaec4b6119396e4609fd8ec76dda69a50c32f)
+++ src/Potentials/unittests/SerializablePotentialUnitTest.hpp	(revision 6efcaec4b6119396e4609fd8ec76dda69a50c32f)
@@ -0,0 +1,40 @@
+/*
+ * SerializablePotentialUnitTest.hpp
+ *
+ *  Created on: Nov 23, 2012
+ *      Author: heber
+ */
+
+#ifndef SERIALIZABLEPOTENTIALUNITTEST_HPP_
+#define SERIALIZABLEPOTENTIALUNITTEST_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+
+#include <cppunit/extensions/HelperMacros.h>
+
+#include "stubs/SerializablePotentialMock.hpp"
+
+/********************************************** Test classes **************************************/
+
+class SerializablePotentialTest : public CppUnit::TestFixture
+{
+    CPPUNIT_TEST_SUITE( SerializablePotentialTest) ;
+    CPPUNIT_TEST ( inputTest );
+    CPPUNIT_TEST ( outputTest );
+    CPPUNIT_TEST_SUITE_END();
+
+public:
+      void setUp();
+      void tearDown();
+      void inputTest();
+      void outputTest();
+
+private:
+      SerializablePotentialMock mockpotential;
+};
+
+#endif /* SERIALIZABLEPOTENTIALUNITTEST_HPP_ */
Index: src/Potentials/unittests/stubs/SerializablePotentialMock.cpp
===================================================================
--- src/Potentials/unittests/stubs/SerializablePotentialMock.cpp	(revision 6efcaec4b6119396e4609fd8ec76dda69a50c32f)
+++ src/Potentials/unittests/stubs/SerializablePotentialMock.cpp	(revision 6efcaec4b6119396e4609fd8ec76dda69a50c32f)
@@ -0,0 +1,58 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2012 University of Bonn. All rights reserved.
+ * Please see the COPYING file or "Copyright notice" in builder.cpp for details.
+ * 
+ *
+ *   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/>. 
+ */
+
+/*
+ * SerializablePotentialMock.cpp
+ *
+ *  Created on: 23.11.2012
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include "SerializablePotentialMock.hpp"
+
+#include "CodePatterns/Assert.hpp"
+
+#include <boost/assign.hpp>
+
+using namespace boost::assign;
+
+// static definitions
+const SerializablePotential::ParameterNames_t SerializablePotentialMock::paramNames(1, std::string("dummy_constant"));
+
+const std::string SerializablePotentialMock::potential_token("serializablepotentialmock");
+
+
+void SerializablePotentialMock::setParameters(const parameters_t &_params)
+{
+  ASSERT( _params.size() == (size_t)1,
+      "SerializablePotentialMock::setParameters() - not the right number of parameters.");
+  params = _params;
+}
+
Index: src/Potentials/unittests/stubs/SerializablePotentialMock.hpp
===================================================================
--- src/Potentials/unittests/stubs/SerializablePotentialMock.hpp	(revision 6efcaec4b6119396e4609fd8ec76dda69a50c32f)
+++ src/Potentials/unittests/stubs/SerializablePotentialMock.hpp	(revision 6efcaec4b6119396e4609fd8ec76dda69a50c32f)
@@ -0,0 +1,89 @@
+/*
+ * SerializablePotentialMock.hpp
+ *
+ *  Created on: 23.11.2012
+ *      Author: heber
+ */
+
+#ifndef SERIALIZABLEPOTENTIALMOCK_HPP_
+#define SERIALIZABLEPOTENTIALMOCK_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string>
+
+#include "Potentials/SerializablePotential.hpp"
+
+/** This is a test implementation of a SerializablePotential for the unit test.
+ *
+ */
+class SerializablePotentialMock : public SerializablePotential
+{
+public :
+  SerializablePotentialMock() :
+    SerializablePotential(ParticleTypes_t(1, ParticleType_t(1))),
+    params(1, 0)
+  {}
+  ~SerializablePotentialMock() {}
+
+  /* ==== Implementing virtual functions from SerializablePotental ==== */
+
+  /** Return the token name of this specific potential.
+   *
+   * \return token name of the potential
+   */
+  const std::string& getToken() const
+  { return potential_token; }
+
+  /** Returns a vector of parameter names.
+   *
+   * This is required from the specific implementation
+   *
+   * \return vector of strings containing parameter names
+   */
+  const ParameterNames_t& getParameterNames() const
+  { return paramNames; }
+
+  /* ==== Implementing virtual functions from FunctionModel ==== */
+
+  /** Setter for the parameters of the model function.
+   *
+   * \param _params set of parameters to set
+   */
+  void setParameters(const parameters_t &_params);
+
+  /** Getter for the parameters of this model function.
+   *
+   * \return current set of parameters of the model function
+   */
+  parameters_t getParameters() const
+  { return params; }
+
+  /** Getter for the number of parameters of this model function.
+   *
+   * \return number of parameters
+   */
+  size_t getParameterDimension() const
+  { return 1; }
+
+
+  enum parameter_enum_t {
+    dummy_constant=0,
+    MAXPARAMS
+  };
+private:
+  //!> parameter vector with parameters as in enum parameter_enum_t
+  parameters_t params;
+
+private:
+  //!> names of each parameter
+  static const ParameterNames_t paramNames;
+
+  //!> static token of this potential type
+  static const std::string potential_token;
+};
+
+#endif /* SERIALIZABLEPOTENTIALMOCK_HPP_ */
