Index: src/Jobs/Grid/unittests/SamplingGridUnitTest.cpp
===================================================================
--- src/Jobs/Grid/unittests/SamplingGridUnitTest.cpp	(revision 64bafe0d0cd15e6cd2e50cb7a27b730cfec01778)
+++ src/Jobs/Grid/unittests/SamplingGridUnitTest.cpp	(revision 313f836ec20460ebbd14dc92299a0031bcfe28d3)
@@ -116,4 +116,97 @@
 }
 
+/** UnitTest for isCongruent()
+ */
+void SamplingGridTest::isCongruent_Test()
+{
+  const double begin[3] = { 0., 0., 0. };
+  const double end[3] = { 2., 2., 2. };
+  const double otherbegin[3] = { 0.1, 0.1, 0.1 };
+  const double otherend[3] = { 1., 1., 1. };
+  SamplingGridProperties illegal_begin_props(otherbegin, end, 5);
+  SamplingGridProperties illegal_end_props(begin, otherend, 5);
+  SamplingGridProperties illegal_level_props(begin, end, 5);
+  SamplingGridProperties legal_props(begin, end, 2);
+
+  // differing windows
+  const double begin_window[3] = { 0.5, 0.5, 0.5 };
+  const double end_window[3] = { 1., 1., 1. };
+  const double otherbegin_window[3] = { 0.45, 0.45, 0.45 };
+  const double otherend_window[3] = { 1.05, 1.05, 1.05 };
+
+  // check that incompatible grid are also incongruent
+  SamplingGrid default_grid(legal_props);
+  // note that we always construct a temporary SamplingGrid from given props
+  CPPUNIT_ASSERT( default_grid.isCompatible(illegal_begin_props) == default_grid.isCongruent(illegal_begin_props));
+  CPPUNIT_ASSERT( default_grid.isCompatible(illegal_end_props) == default_grid.isCongruent(illegal_end_props));
+  CPPUNIT_ASSERT( default_grid.isCompatible(illegal_level_props) == default_grid.isCongruent(illegal_level_props));
+  CPPUNIT_ASSERT( default_grid.isCompatible(legal_props) == default_grid.isCongruent(legal_props) );
+
+  default_grid.setWindowSize(begin, end);
+  // same window
+  {
+    SamplingGrid illegal_begin_grid(illegal_begin_props);
+    SamplingGrid illegal_end_grid(illegal_end_props);
+    SamplingGrid illegal_level_grid(illegal_level_props);
+    SamplingGrid legal_grid(legal_props);
+    illegal_begin_grid.setWindowSize(begin, end);
+    illegal_end_grid.setWindowSize(begin, end);
+    illegal_level_grid.setWindowSize(begin, end);
+    legal_grid.setWindowSize(begin, end);
+    CPPUNIT_ASSERT( !illegal_begin_grid.isCongruent(default_grid) );
+    CPPUNIT_ASSERT( !illegal_end_grid.isCongruent(default_grid) );
+    CPPUNIT_ASSERT( !illegal_level_grid.isCongruent(default_grid) );
+    CPPUNIT_ASSERT( legal_grid.isCongruent(default_grid) );
+  }
+
+  // different begin
+  {
+    SamplingGrid illegal_begin_grid(illegal_begin_props);
+    SamplingGrid illegal_end_grid(illegal_end_props);
+    SamplingGrid illegal_level_grid(illegal_level_props);
+    SamplingGrid legal_grid(legal_props);
+    illegal_begin_grid.setWindowSize(otherbegin_window, end);
+    illegal_end_grid.setWindowSize(otherbegin_window, end);
+    illegal_level_grid.setWindowSize(otherbegin_window, end);
+    legal_grid.setWindowSize(begin, end);
+    CPPUNIT_ASSERT( !illegal_begin_grid.isCongruent(legal_grid) );
+    CPPUNIT_ASSERT( !illegal_end_grid.isCongruent(legal_grid) );
+    CPPUNIT_ASSERT( !illegal_level_grid.isCongruent(legal_grid) );
+    CPPUNIT_ASSERT( legal_grid.isCongruent(default_grid) );
+  }
+
+  // different end
+  {
+    SamplingGrid illegal_begin_grid(illegal_begin_props);
+    SamplingGrid illegal_end_grid(illegal_end_props);
+    SamplingGrid illegal_level_grid(illegal_level_props);
+    SamplingGrid legal_grid(legal_props);
+    illegal_begin_grid.setWindowSize(begin, otherend_window);
+    illegal_end_grid.setWindowSize(begin, otherend_window);
+    illegal_level_grid.setWindowSize(begin, otherend_window);
+    legal_grid.setWindowSize(begin, end);
+    CPPUNIT_ASSERT( !illegal_begin_grid.isCongruent(legal_grid) );
+    CPPUNIT_ASSERT( !illegal_end_grid.isCongruent(legal_grid) );
+    CPPUNIT_ASSERT( !illegal_level_grid.isCongruent(legal_grid) );
+    CPPUNIT_ASSERT( legal_grid.isCongruent(default_grid) );
+  }
+
+  // different begin and end
+  {
+    SamplingGrid illegal_begin_grid(illegal_begin_props);
+    SamplingGrid illegal_end_grid(illegal_end_props);
+    SamplingGrid illegal_level_grid(illegal_level_props);
+    SamplingGrid legal_grid(legal_props);
+    illegal_begin_grid.setWindowSize(otherbegin_window, otherend_window);
+    illegal_end_grid.setWindowSize(otherbegin_window, otherend_window);
+    illegal_level_grid.setWindowSize(otherbegin_window, otherend_window);
+    legal_grid.setWindowSize(begin, end);
+    CPPUNIT_ASSERT( !illegal_begin_grid.isCongruent(legal_grid) );
+    CPPUNIT_ASSERT( !illegal_end_grid.isCongruent(legal_grid) );
+    CPPUNIT_ASSERT( !illegal_level_grid.isCongruent(legal_grid) );
+    CPPUNIT_ASSERT( legal_grid.isCongruent(default_grid) );
+  }
+}
+
 /** UnitTest for integral()
  */
Index: src/Jobs/Grid/unittests/SamplingGridUnitTest.hpp
===================================================================
--- src/Jobs/Grid/unittests/SamplingGridUnitTest.hpp	(revision 64bafe0d0cd15e6cd2e50cb7a27b730cfec01778)
+++ src/Jobs/Grid/unittests/SamplingGridUnitTest.hpp	(revision 313f836ec20460ebbd14dc92299a0031bcfe28d3)
@@ -27,4 +27,5 @@
     CPPUNIT_TEST ( operatorPlusEqual_Test );
     CPPUNIT_TEST ( operatorMinusEqual_Test );
+    CPPUNIT_TEST ( isCongruent_Test );
     CPPUNIT_TEST ( integral_Test );
     CPPUNIT_TEST ( getVolume_Test );
@@ -40,4 +41,5 @@
       void tearDown();
       void compatibleGrids_Test();
+      void isCongruent_Test();
       void integral_Test();
       void getVolume_Test();
