diff --git a/src/main/java/org/eclipse/openk/core/controller/MasterDataBackendController.java b/src/main/java/org/eclipse/openk/core/controller/MasterDataBackendController.java
index 5dd96d6..b92565d 100644
--- a/src/main/java/org/eclipse/openk/core/controller/MasterDataBackendController.java
+++ b/src/main/java/org/eclipse/openk/core/controller/MasterDataBackendController.java
@@ -13,31 +13,13 @@
 
 import org.apache.log4j.Logger;
 import org.eclipse.jetty.http.HttpStatus;
-import org.eclipse.openk.api.BackendSettings;
-import org.eclipse.openk.api.Branch;
-import org.eclipse.openk.api.BranchLevel;
-import org.eclipse.openk.api.CostCenter;
-import org.eclipse.openk.api.GmStatus;
-import org.eclipse.openk.api.UserDepartment;
-import org.eclipse.openk.api.UserSettings;
+import org.eclipse.openk.api.*;
 import org.eclipse.openk.api.mail.EmailTemplatePaths;
 import org.eclipse.openk.common.mapper.generic.GenericApiToDbMapper;
 import org.eclipse.openk.common.util.ResourceLoaderBase;
 import org.eclipse.openk.core.exceptions.HttpStatusException;
-import org.eclipse.openk.db.dao.AutoCloseEntityManager;
-import org.eclipse.openk.db.dao.EntityHelper;
-import org.eclipse.openk.db.dao.RefBranchDao;
-import org.eclipse.openk.db.dao.RefBranchLevelDao;
-import org.eclipse.openk.db.dao.RefCostCenterDao;
-import org.eclipse.openk.db.dao.RefGmStatusDao;
-import org.eclipse.openk.db.dao.RefUserDepartmentDao;
-import org.eclipse.openk.db.dao.TblUserSettingsDao;
-import org.eclipse.openk.db.model.RefBranch;
-import org.eclipse.openk.db.model.RefBranchLevel;
-import org.eclipse.openk.db.model.RefCostCenter;
-import org.eclipse.openk.db.model.RefGmStatus;
-import org.eclipse.openk.db.model.RefUserDepartment;
-import org.eclipse.openk.db.model.TblUserSettings;
+import org.eclipse.openk.db.dao.*;
+import org.eclipse.openk.db.model.*;
 
 import javax.persistence.EntityManager;
 import java.time.Instant;
@@ -193,6 +175,19 @@
         return vmList;
     }
 
+    public List<Territory> getTerritories()  {
+        List<Territory> vmList = new java.util.ArrayList<>();
+
+        try (AutoCloseEntityManager em = createEm()){
+            RefTerritoryDao territoryDao = createRefTerritoryDao(em);
+
+            List<RefTerritory>mList = territoryDao.getTerritoriesInTx();
+            GenericApiToDbMapper mapper = new GenericApiToDbMapper();
+            mList.forEach(m -> vmList.add(mapper.mapToViewModel(Territory.class, m)));
+        }
+        return vmList;
+    }
+
     public UserSettings getUserSettings(String username, String settingType)  throws HttpStatusException{
         UserSettings userSettings = new UserSettings();
 
@@ -266,6 +261,8 @@
 
     protected RefUserDepartmentDao createRefUserDepartmentDao(EntityManager em) { return new RefUserDepartmentDao(em); }
 
+    protected RefTerritoryDao createRefTerritoryDao(EntityManager em) { return new RefTerritoryDao(em); }
+
     protected TblUserSettingsDao createRefUserSettingsDao(EntityManager em) { return new TblUserSettingsDao(em); }
 
     protected AutoCloseEntityManager createEm() {
diff --git a/src/main/java/org/eclipse/openk/resources/MasterDataResource.java b/src/main/java/org/eclipse/openk/resources/MasterDataResource.java
index 5a8ef12..c802f89 100644
--- a/src/main/java/org/eclipse/openk/resources/MasterDataResource.java
+++ b/src/main/java/org/eclipse/openk/resources/MasterDataResource.java
@@ -120,6 +120,17 @@
                 .getUserDepartments());
     }
 
+    @ApiOperation(value = "Territory", notes = "This service gets all territories as Strings from the Database")
+    @ApiResponses( value ={ @ApiResponse(code = 200, message = "OK", response = Territory.class,reference = "#/definitions/Territory") } )
+    @GET
+    @Path("/getTerritories")
+    @Produces(MediaType.APPLICATION_JSON)
+    @Timed
+    public Response getTerritories(@ApiParam(name ="Authorization", value ="JWT Token", required =true)@HeaderParam(Globals.KEYCLOAK_AUTH_TAG) String jwt) {
+        return invokeRunnable(jwt, SecureType.NORMAL, modusr -> new MasterDataBackendController()
+                .getTerritories());
+    }
+
     @ApiOperation(value = "UserSettings", notes = "This service gets all User-Settings for the given Username from the Database")
     @ApiResponses( value ={ @ApiResponse(code = 200, message = "OK", response = UserSettings.class,reference = "#/definitions/UserSettings") } )
     @GET
diff --git a/src/test/java/org/eclipse/openk/api/TerritoryTest.java b/src/test/java/org/eclipse/openk/api/TerritoryTest.java
new file mode 100644
index 0000000..b478bd6
--- /dev/null
+++ b/src/test/java/org/eclipse/openk/api/TerritoryTest.java
@@ -0,0 +1,61 @@
+/**
+ ******************************************************************************
+ * Copyright © 2018 PTA GmbH.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
+ *     http://www.eclipse.org/legal/epl-v10.html
+ *
+ ******************************************************************************
+ */
+package org.eclipse.openk.api;
+
+import static org.junit.Assert.assertEquals;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import java.io.IOException;
+import org.junit.Test;
+
+public class TerritoryTest {
+
+    @Test
+    public void testGetId()throws IOException {
+        Territory territory = new Territory();
+        territory.setId(6);
+
+        ObjectMapper om = new ObjectMapper();
+        String jsonString = om.writeValueAsString(territory);
+
+        Territory territory2 = om.readValue(jsonString, Territory.class);
+
+        assertEquals(territory.getId(), territory2.getId());
+    }
+
+    @Test
+    public void testGetName()throws IOException {
+        Territory territory = new Territory();
+        territory.setName("territoryName");
+
+        ObjectMapper om = new ObjectMapper();
+        String jsonString = om.writeValueAsString(territory);
+
+        Territory territory2 = om.readValue(jsonString, Territory.class);
+
+        assertEquals(territory.getName(), territory2.getName());
+    }
+
+    @Test
+    public void testGetDescription()throws IOException {
+        Territory territory = new Territory();
+        territory.setDescription("Territory Description");
+
+        ObjectMapper om = new ObjectMapper();
+        String jsonString = om.writeValueAsString(territory);
+
+        Territory territory2 = om.readValue(jsonString, Territory.class);
+
+        assertEquals(territory.getDescription(), territory2.getDescription());
+    }
+}
+
diff --git a/src/test/java/org/eclipse/openk/core/controller/MasterDataBackendControllerTest.java b/src/test/java/org/eclipse/openk/core/controller/MasterDataBackendControllerTest.java
index 237044e..3f7c143 100644
--- a/src/test/java/org/eclipse/openk/core/controller/MasterDataBackendControllerTest.java
+++ b/src/test/java/org/eclipse/openk/core/controller/MasterDataBackendControllerTest.java
@@ -22,27 +22,11 @@
 import org.apache.http.HttpStatus;
 import org.easymock.EasyMock;
 import org.eclipse.openk.TestUtils.TestHelper;
-import org.eclipse.openk.api.Branch;
-import org.eclipse.openk.api.BranchLevel;
-import org.eclipse.openk.api.CostCenter;
-import org.eclipse.openk.api.GmStatus;
-import org.eclipse.openk.api.UserDepartment;
-import org.eclipse.openk.api.UserSettings;
+import org.eclipse.openk.api.*;
 import org.eclipse.openk.common.mapper.generic.GenericApiToDbMapper;
 import org.eclipse.openk.core.exceptions.HttpStatusException;
-import org.eclipse.openk.db.dao.AutoCloseEntityManager;
-import org.eclipse.openk.db.dao.RefBranchDao;
-import org.eclipse.openk.db.dao.RefBranchLevelDao;
-import org.eclipse.openk.db.dao.RefCostCenterDao;
-import org.eclipse.openk.db.dao.RefGmStatusDao;
-import org.eclipse.openk.db.dao.RefUserDepartmentDao;
-import org.eclipse.openk.db.dao.TblUserSettingsDao;
-import org.eclipse.openk.db.model.RefBranch;
-import org.eclipse.openk.db.model.RefBranchLevel;
-import org.eclipse.openk.db.model.RefCostCenter;
-import org.eclipse.openk.db.model.RefGmStatus;
-import org.eclipse.openk.db.model.RefUserDepartment;
-import org.eclipse.openk.db.model.TblUserSettings;
+import org.eclipse.openk.db.dao.*;
+import org.eclipse.openk.db.model.*;
 import org.junit.Before;
 import org.junit.Test;
 import org.powermock.api.easymock.PowerMock;
@@ -87,6 +71,7 @@
         public RefBranchDao branchDao;
         public RefBranchLevelDao branchLevelDao;
         public RefUserDepartmentDao userDepartmentDao;
+        public RefTerritoryDao territoryDao;
         public RefCostCenterDao costCenterDao;
         public TblUserSettingsDao userSettingsDao;
 
@@ -170,6 +155,16 @@
         }
 
         @Override
+        protected RefTerritoryDao createRefTerritoryDao( EntityManager em ) {
+            if( territoryDao != null ) {
+                return territoryDao;
+            }
+            else {
+                return super.createRefTerritoryDao(em);
+            }
+        }
+
+        @Override
         protected TblUserSettingsDao createRefUserSettingsDao( EntityManager em ) {
             if( userSettingsDao != null ) {
                 return userSettingsDao;
@@ -327,6 +322,32 @@
         return dao;
     }
 
+    private RefTerritoryDao createRefTerritoryDao() {
+
+        java.util.List<RefTerritory> mList = new ArrayList<RefTerritory>();
+
+        RefTerritory refTerritory1 = new RefTerritory();
+        refTerritory1.setId(1);
+        refTerritory1.setName("Nord");
+        mList.add(refTerritory1);
+
+        RefTerritory refTerritory2 = new RefTerritory();
+        refTerritory2.setId(2);
+        refTerritory2.setName("Ost");
+        mList.add(refTerritory2);
+
+        RefTerritory refTerritory3 = new RefTerritory();
+        refTerritory3.setId(3);
+        refTerritory3.setName("Süd");
+        mList.add(refTerritory3);
+
+        RefTerritoryDao dao = EasyMock.createMock(RefTerritoryDao.class);
+        expect( dao.getTerritoriesInTx() ).andReturn(mList).anyTimes();
+        replay( dao );
+        verify( dao );
+        return dao;
+    }
+
     private TblUserSettingsDao createTblUserSettingsDao(String error) throws HttpStatusException{
 
         TblUserSettings tblUserSettings = new TblUserSettings();
@@ -444,6 +465,19 @@
     }
 
     @Test
+    public void testGetTerritories() throws Exception {
+        RefTerritoryDao dao = createRefTerritoryDao();
+        MasterDataBackendControllerTest.TestableMasterDataBackendController tbc = new MasterDataBackendControllerTest.TestableMasterDataBackendController();
+        tbc.territoryDao = dao;
+
+        List<Territory> retList = tbc.getTerritories();
+        List<RefTerritory> orgList = dao.getTerritoriesInTx();
+        assertEquals(orgList.size(), retList.size());
+        assertEquals(orgList.get(2).getId(), retList.get(2).getId());
+        assertEquals(orgList.get(1).getName(), retList.get(1).getName());
+    }
+
+    @Test
     public void testGetUserSettings() throws Exception {
         TblUserSettingsDao dao = createTblUserSettingsDao("");
         MasterDataBackendControllerTest.TestableMasterDataBackendController tbc = new MasterDataBackendControllerTest.TestableMasterDataBackendController();
diff --git a/src/test/java/org/eclipse/openk/db/model/RefTerritoryTest.java b/src/test/java/org/eclipse/openk/db/model/RefTerritoryTest.java
new file mode 100644
index 0000000..2c8c712
--- /dev/null
+++ b/src/test/java/org/eclipse/openk/db/model/RefTerritoryTest.java
@@ -0,0 +1,54 @@
+/*
+ * ***************************************************************************
+ *  Copyright © 2018 PTA GmbH.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *
+ *            http://www.eclipse.org/legal/epl-v10.html
+ *
+ * ***************************************************************************
+ */
+package org.eclipse.openk.db.model;
+
+import org.junit.Test;
+
+import static junit.framework.TestCase.assertEquals;
+
+public class RefTerritoryTest {
+
+    @Test
+    public void testGettersAndSetters() {
+
+        RefTerritory refTerritory = new RefTerritory();
+
+        refTerritory.setId(1);
+        assertEquals((Integer)1, refTerritory.getId());
+
+        refTerritory.setName("hugo");
+        assertEquals("hugo", refTerritory.getName());
+
+        refTerritory.setDescription("description");
+        assertEquals("description", refTerritory.getDescription());
+
+        refTerritory.setCreateUser("Create User");
+        assertEquals("Create User", refTerritory.getCreateUser());
+
+        java.time.LocalDateTime ldtCreate = java.time.LocalDateTime.parse("2018-08-20T15:00:00");
+        java.sql.Timestamp tsCreate = java.sql.Timestamp.valueOf(ldtCreate);
+
+        refTerritory.setCreateDate(tsCreate);
+        org.junit.Assert.assertEquals(tsCreate, refTerritory.getCreateDate());
+
+        refTerritory.setModUser("Modifiing User");
+        assertEquals("Modifiing User", refTerritory.getModUser());
+
+        java.time.LocalDateTime ldtMod = java.time.LocalDateTime.parse("2018-08-21T16:00:00");
+        java.sql.Timestamp tsMod = java.sql.Timestamp.valueOf(ldtMod);
+
+        refTerritory.setModDate(tsMod);
+        org.junit.Assert.assertEquals(tsMod, refTerritory.getModDate());
+    }
+
+}
+
diff --git a/src/test/java/org/eclipse/openk/db/model/TblStepsTest.java b/src/test/java/org/eclipse/openk/db/model/TblStepsTest.java
index a3a829e..b9fc157 100644
--- a/src/test/java/org/eclipse/openk/db/model/TblStepsTest.java
+++ b/src/test/java/org/eclipse/openk/db/model/TblStepsTest.java
@@ -33,6 +33,18 @@
         tblSteps.setSwitchingObject("tool");
         assertEquals("tool", tblSteps.getSwitchingObject());
 
+        tblSteps.setType("type");
+        assertEquals("type", tblSteps.getType());
+
+        tblSteps.setPresentTime("presentTime");
+        assertEquals("presentTime", tblSteps.getPresentTime());
+
+        tblSteps.setPresentState("presentState");
+        assertEquals("presentState", tblSteps.getPresentState());
+
+        tblSteps.setOperator("operator");
+        assertEquals("operator", tblSteps.getOperator());
+
         tblSteps.setTargetState("target");
         assertEquals("target", tblSteps.getTargetState());
 
diff --git a/src/test/java/org/eclipse/openk/resources/MasterDataResourceTest.java b/src/test/java/org/eclipse/openk/resources/MasterDataResourceTest.java
index 02a5d8e..b3089bc 100644
--- a/src/test/java/org/eclipse/openk/resources/MasterDataResourceTest.java
+++ b/src/test/java/org/eclipse/openk/resources/MasterDataResourceTest.java
@@ -67,6 +67,13 @@
     }
 
     @Test
+    public void testGeTerritories() {
+        Response r = new MasterDataResource().getTerritories("LET_ME_IN");
+        assertNotNull( r );
+    }
+
+
+    @Test
     public void testStoreUserSettings_update() throws HttpStatusException{
 
         UserSettings us = createUserSetting();
diff --git a/src/test/java/org/eclipse/openk/resources/PlannedGridMeasuresResourcesTest.java b/src/test/java/org/eclipse/openk/resources/PlannedGridMeasuresResourcesTest.java
index 49aef0a..ad07c30 100644
--- a/src/test/java/org/eclipse/openk/resources/PlannedGridMeasuresResourcesTest.java
+++ b/src/test/java/org/eclipse/openk/resources/PlannedGridMeasuresResourcesTest.java
@@ -165,4 +165,10 @@
         assertNotNull( r );
     }
 
+    @Test
+    public void testGetResponsiblesOnSiteFromGridmeasures()  {
+        Response r = new PlannedGridMeasuresResource().getResponsiblesOnSiteFromGridmeasures("LET_ME_IN");
+        assertNotNull( r );
+    }
+
 }
