diff --git a/Tests/UnitTests/GUI/TestDetectorItems.h b/Tests/UnitTests/GUI/TestDetectorItems.h
new file mode 100644
index 0000000000000000000000000000000000000000..b641be827465a3274d1fb7679fcf8773af7a7604
--- /dev/null
+++ b/Tests/UnitTests/GUI/TestDetectorItems.h
@@ -0,0 +1,31 @@
+#include <QtTest>
+#include "RectangularDetectorItem.h"
+#include "InstrumentModel.h"
+#include "ComboProperty.h"
+
+class TestDetectorItems : public QObject {
+    Q_OBJECT
+
+private slots:
+    void test_detectorAlignment();
+};
+
+inline void TestDetectorItems::test_detectorAlignment()
+{
+    InstrumentModel model;
+    SessionItem* detector = model.insertNewItem(Constants::RectangularDetectorType);
+
+    ComboProperty alignment
+        = detector->getItemValue(RectangularDetectorItem::P_ALIGNMENT).value<ComboProperty>();
+    // generic has some more items visible
+    alignment.setValue(Constants::ALIGNMENT_GENERIC);
+    detector->setItemValue(RectangularDetectorItem::P_ALIGNMENT,
+                           QVariant::fromValue<ComboProperty>(alignment));
+    QVERIFY(detector->getItem(RectangularDetectorItem::P_NORMAL)->isVisible());
+
+    // should be disabled if we switch
+    alignment.setValue(Constants::ALIGNMENT_TO_REFLECTED_BEAM);
+    detector->setItemValue(RectangularDetectorItem::P_ALIGNMENT,
+                           QVariant::fromValue<ComboProperty>(alignment));
+    QVERIFY(detector->getItem(RectangularDetectorItem::P_NORMAL)->isVisible() == false);
+}
diff --git a/Tests/UnitTests/GUI/TestGUI.cpp b/Tests/UnitTests/GUI/TestGUI.cpp
index 4993478816bc1cd3bc1a4ae40f74301e00516981..ef8dabe94413796f6219806d967c357ecd517179 100644
--- a/Tests/UnitTests/GUI/TestGUI.cpp
+++ b/Tests/UnitTests/GUI/TestGUI.cpp
@@ -20,6 +20,7 @@
 #include "TestTranslations.h"
 #include "TestGroupProperty.h"
 #include "TestParameterTreeUtils.h"
+#include "TestDetectorItems.h"
 
 int main(int argc, char** argv) {
     QCoreApplication app(argc, argv);
@@ -46,6 +47,7 @@ int main(int argc, char** argv) {
     TestGroupProperty testGroupProperty;
     TestParticleDistributionItem testParticleDistributionItem;
     TestParameterTreeUtils testParameterTreeUtils;
+    TestDetectorItems testDetectorItems;
 
     bool status(false);
 
@@ -69,6 +71,7 @@ int main(int argc, char** argv) {
     status |= QTest::qExec(&testGroupProperty, argc, argv);
     status |= QTest::qExec(&testParticleDistributionItem, argc, argv);
     status |= QTest::qExec(&testParameterTreeUtils, argc, argv);
+    status |= QTest::qExec(&testDetectorItems, argc, argv);
 
     return status;
 }
diff --git a/Tests/UnitTests/GUI/TestMapperCases.h b/Tests/UnitTests/GUI/TestMapperCases.h
index 61741d9e4b0ad974d319fc66237bbc043ec117c8..3bf0c366f9e8405dd6353c51e82946900774f389 100644
--- a/Tests/UnitTests/GUI/TestMapperCases.h
+++ b/Tests/UnitTests/GUI/TestMapperCases.h
@@ -1,97 +1,53 @@
-#include "SessionItem.h"
 #include "SampleModel.h"
-#include "InstrumentModel.h"
-#include "item_constants.h"
 #include "ParticleItem.h"
-#include "ParticleCompositionItem.h"
-#include "InterferenceFunctionItems.h"
 #include "ParticleLayoutItem.h"
-#include "DetectorItems.h"
-#include "SphericalDetectorItem.h"
-#include "RectangularDetectorItem.h"
 #include "ComboProperty.h"
 #include "DocumentModel.h"
 #include "SimulationOptionsItem.h"
-#include "Lattice2DItems.h"
-#include <memory>
 #include <QtTest>
 
-class TestMapperCases : public QObject {
+class TestMapperCases : public QObject
+{
     Q_OBJECT
 
 private slots:
     void test_ParticeleCompositionUpdate();
-    void test_instrumentAlignmentPropertyVisibility();
-//    void test_removeMaskOnDetectorChange();
     void test_SimulationOptionsComputationToggle();
 };
 
 inline void TestMapperCases::test_ParticeleCompositionUpdate()
 {
     SampleModel model;
-    SessionItem *multilayer = model.insertNewItem(Constants::MultiLayerType);
-    SessionItem *layer = model.insertNewItem(Constants::LayerType, multilayer->index());
-    SessionItem *layout = model.insertNewItem(Constants::ParticleLayoutType, layer->index());
+    SessionItem* multilayer = model.insertNewItem(Constants::MultiLayerType);
+    SessionItem* layer = model.insertNewItem(Constants::LayerType, multilayer->index());
+    SessionItem* layout = model.insertNewItem(Constants::ParticleLayoutType, layer->index());
 
     // composition added to layout should have abundance enabled
-    SessionItem *compositionFree = model.insertNewItem(Constants::ParticleCompositionType, layout->index());
+    SessionItem* compositionFree
+        = model.insertNewItem(Constants::ParticleCompositionType, layout->index());
     QVERIFY(compositionFree->getItem(ParticleItem::P_ABUNDANCE)->isEnabled());
 
     // composition added to distribution should have abundance disabled
-    SessionItem *distribution = model.insertNewItem(Constants::ParticleDistributionType, layout->index());
-    SessionItem *composition = model.insertNewItem(Constants::ParticleCompositionType, distribution->index());
+    SessionItem* distribution
+        = model.insertNewItem(Constants::ParticleDistributionType, layout->index());
+    SessionItem* composition
+        = model.insertNewItem(Constants::ParticleCompositionType, distribution->index());
     QVERIFY(composition->getItem(ParticleItem::P_ABUNDANCE)->isEnabled() == false);
 
     composition = distribution->takeRow(composition->parentRow());
     QVERIFY(composition->getItem(ParticleItem::P_ABUNDANCE)->isEnabled());
     delete composition;
-
-}
-
-inline void TestMapperCases::test_instrumentAlignmentPropertyVisibility()
-{
-    InstrumentModel model;
-    SessionItem *instrument = model.insertNewItem(Constants::InstrumentType);
-    SessionItem *detector = model.insertNewItem(Constants::DetectorContainerType, instrument->index());
-    detector->setGroupProperty(DetectorContainerItem::P_DETECTOR, Constants::RectangularDetectorType);
-    SessionItem *rectangular = detector->getGroupItem(DetectorContainerItem::P_DETECTOR);
-
-
-    ComboProperty alignment = rectangular->getItemValue(RectangularDetectorItem::P_ALIGNMENT)
-            .value<ComboProperty>();
-    // generic has some more items visible
-    alignment.setValue(Constants::ALIGNMENT_GENERIC);
-    rectangular->setItemValue(RectangularDetectorItem::P_ALIGNMENT, QVariant::fromValue<ComboProperty>(alignment));
-    QVERIFY(rectangular->getItem(RectangularDetectorItem::P_NORMAL)->isVisible());
-
-    // should be disabled if we switch
-    alignment.setValue(Constants::ALIGNMENT_TO_REFLECTED_BEAM);
-    rectangular->setItemValue(RectangularDetectorItem::P_ALIGNMENT, QVariant::fromValue<ComboProperty>(alignment));
-    QVERIFY(rectangular->getItem(RectangularDetectorItem::P_NORMAL)->isVisible() == false);
-
 }
 
-//inline void TestMapperCases::test_removeMaskOnDetectorChange()
-//{
-//    InstrumentModel model;
-//    SessionItem *instrument = model.insertNewItem(Constants::InstrumentType);
-//    SessionItem *detector = model.insertNewItem(Constants::DetectorContainerType, instrument->index());
-//    detector->setGroupProperty(DetectorContainerItem::P_DETECTOR, Constants::RectangularDetectorType);
-//    model.insertNewItem(Constants::MaskContainerType, detector->index());
-//    QVERIFY(detector->getItems(DetectorContainerItem::T_MASKS).size() == 1);
-//    // after change the mask container should be removed
-//    detector->setGroupProperty(DetectorContainerItem::P_DETECTOR, Constants::SphericalDetectorType);
-//    QVERIFY(detector->getItems(DetectorContainerItem::T_MASKS).size() == 0);
-//}
-
 inline void TestMapperCases::test_SimulationOptionsComputationToggle()
 {
     DocumentModel model;
     model.insertNewItem(Constants::SimulationOptionsType);
 
-    SimulationOptionsItem *item = model.getSimulationOptionsItem();
+    SimulationOptionsItem* item = model.getSimulationOptionsItem();
 
-    ComboProperty combo = item->getItemValue(SimulationOptionsItem::P_COMPUTATION_METHOD).value<ComboProperty>();
+    ComboProperty combo
+        = item->getItemValue(SimulationOptionsItem::P_COMPUTATION_METHOD).value<ComboProperty>();
     QCOMPARE(combo.getValue(), Constants::SIMULATION_ANALYTICAL);
     QVERIFY(item->getItem(SimulationOptionsItem::P_MC_POINTS)->isEnabled() == false);