Index: src/unittests/Makefile.am
===================================================================
--- src/unittests/Makefile.am	(revision bbf1bd95420fd2556318900509aeb2a2b49865e8)
+++ src/unittests/Makefile.am	(revision b4cf2b752620d3a300d2fa3fef55de302a2b7065)
@@ -42,4 +42,5 @@
   SingletonTest \
   StackClassUnitTest \
+  SubspaceFactorizerUnitTest \
   TesselationUnitTest \
   Tesselation_BoundaryTriangleUnitTest \
@@ -247,4 +248,7 @@
 StackClassUnitTest_LDADD = ${ALLLIBS}
 
+SubspaceFactorizerUnitTest_SOURCES = UnitTestMain.cpp SubspaceFactorizerUnittest.cpp SubspaceFactorizerUnittest.hpp
+SubspaceFactorizerUnitTest_LDADD = ${ALLLIBS}
+
 TesselationUnitTest_SOURCES = UnitTestMain.cpp tesselationunittest.cpp tesselationunittest.hpp
 TesselationUnitTest_LDADD = ${ALLLIBS}
Index: src/unittests/SubspaceFactorizerUnittest.cpp
===================================================================
--- src/unittests/SubspaceFactorizerUnittest.cpp	(revision b4cf2b752620d3a300d2fa3fef55de302a2b7065)
+++ src/unittests/SubspaceFactorizerUnittest.cpp	(revision b4cf2b752620d3a300d2fa3fef55de302a2b7065)
@@ -0,0 +1,115 @@
+/*
+ * 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.
+ */
+
+/*
+ * SubspaceFactorizerUnittest.cpp
+ *
+ *  Created on: Nov 13, 2010
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <cppunit/CompilerOutputter.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/ui/text/TestRunner.h>
+
+#include <cmath>
+
+#include <gsl/gsl_vector.h>
+
+#include "SubspaceFactorizerUnittest.hpp"
+#include "LinearAlgebra/VectorContent.hpp"
+#include "LinearAlgebra/MatrixContent.hpp"
+
+#ifdef HAVE_TESTRUNNER
+#include "UnitTestMain.hpp"
+#endif /*HAVE_TESTRUNNER*/
+
+// Registers the fixture into the 'registry'
+CPPUNIT_TEST_SUITE_REGISTRATION( SubspaceFactorizerUnittest );
+
+void SubspaceFactorizerUnittest::setUp(){
+  fourbyfour = new MatrixContent(4,4);
+  fourbyfour->setZero();
+  for (int i=0; i<4 ; i++) {
+    fourbyfour->set(i,i, 2.);
+    if (i < (4-1)) {
+      fourbyfour->set(i+1,i, 1.);
+      fourbyfour->set(i,i+1, 1.);
+    }
+  }
+  permU1_1 = new MatrixContent(4,1);
+  permU1_1->setZero();
+  permU1_1->set(0,0, 1.);
+  permU1_2 = new MatrixContent(4,1);
+  permU1_2->setZero();
+  permU1_2->set(1,0, 1.);
+  permU1_3 = new MatrixContent(4,1);
+  permU1_3->setZero();
+  permU1_3->set(2,0, 1.);
+  permU1_4 = new MatrixContent(4,1);
+  permU1_4->setZero();
+  permU1_4->set(3,0, 1.);
+
+  permU2_1 = new MatrixContent(4,2);
+  permU2_1->setZero();
+  permU2_1->set(0,0, 1.);
+  permU2_1->set(1,1, 1.);
+  permU2_2 = new MatrixContent(4,2);
+  permU2_2->setZero();
+  permU2_2->set(1,0, 1.);
+  permU2_2->set(2,1, 1.);
+  permU2_3 = new MatrixContent(4,2);
+  permU2_3->setZero();
+  permU2_3->set(2,0, 1.);
+  permU2_3->set(3,1, 1.);
+
+  permU3_1 = new MatrixContent(4,3);
+  permU3_1->setZero();
+  permU3_1->set(0,0, 1.);
+  permU3_1->set(1,1, 1.);
+  permU3_1->set(2,2, 1.);
+  permU3_2 = new MatrixContent(4,3);
+  permU3_2->setZero();
+  permU3_2->set(1,0, 1.);
+  permU3_2->set(2,1, 1.);
+  permU3_2->set(3,2, 1.);
+}
+void SubspaceFactorizerUnittest::tearDown(){
+  delete fourbyfour;
+  delete permU1_1;
+  delete permU1_2;
+  delete permU1_3;
+  delete permU1_4;
+  delete permU2_1;
+  delete permU2_2;
+  delete permU2_3;
+  delete permU3_1;
+  delete permU3_2;
+}
+
+void SubspaceFactorizerUnittest::BlockTest()
+{
+  MatrixContent temp((*fourbyfour)*(*permU1_1));
+  std::cout << "Our matrix is " << *fourbyfour << "." << std::endl;
+
+  std::cout << "Multiplying " << *fourbyfour << " by " << *permU1_1 << " is: " << std::endl;
+  std::cout << temp << std::endl;
+
+  gsl_vector *eigenvalues = temp.transformToEigenbasis();
+  std::cout << "The resulting eigenbasis is " << temp
+      << " with eigenvalues " << gsl_vector_get(eigenvalues, 0)
+      << std::endl;
+  gsl_vector_free(eigenvalues);
+
+  CPPUNIT_ASSERT_EQUAL(0,0);
+}
+
Index: src/unittests/SubspaceFactorizerUnittest.hpp
===================================================================
--- src/unittests/SubspaceFactorizerUnittest.hpp	(revision b4cf2b752620d3a300d2fa3fef55de302a2b7065)
+++ src/unittests/SubspaceFactorizerUnittest.hpp	(revision b4cf2b752620d3a300d2fa3fef55de302a2b7065)
@@ -0,0 +1,40 @@
+/*
+ * SubspaceFactorizerUnittest.hpp
+ *
+ *  Created on: Nov 13, 2010
+ *      Author: heber
+ */
+
+#ifndef SUBSPACEFACTORIZERUNITTEST_HPP_
+#define SUBSPACEFACTORIZERUNITTEST_HPP_
+
+#include <cppunit/extensions/HelperMacros.h>
+
+class MatrixContent;
+
+class SubspaceFactorizerUnittest : public CppUnit::TestFixture
+{
+  CPPUNIT_TEST_SUITE( SubspaceFactorizerUnittest) ;
+  CPPUNIT_TEST ( BlockTest );
+  CPPUNIT_TEST_SUITE_END();
+
+public:
+  void setUp();
+  void tearDown();
+
+  void BlockTest();
+
+  MatrixContent *fourbyfour;
+
+  MatrixContent *permU1_1;
+  MatrixContent *permU1_2;
+  MatrixContent *permU1_3;
+  MatrixContent *permU1_4;
+  MatrixContent *permU2_1;
+  MatrixContent *permU2_2;
+  MatrixContent *permU2_3;
+  MatrixContent *permU3_1;
+  MatrixContent *permU3_2;
+};
+
+#endif /* SUBSPACEFACTORIZERUNITTEST_HPP_ */
