diff --git a/pkg/control/ut_ctrl_submgr_test.go b/pkg/control/ut_ctrl_submgr_test.go
index 3a57177..45147c8 100644
--- a/pkg/control/ut_ctrl_submgr_test.go
+++ b/pkg/control/ut_ctrl_submgr_test.go
@@ -34,9 +34,9 @@
 	c *Control
 }
 
-func createSubmgrControl(rtfile string, port uint16, rtport uint16) *testingSubmgrControl {
+func createSubmgrControl(srcId teststub.RmrSrcId, rtgSvc teststub.RmrRtgSvc) *testingSubmgrControl {
 	mainCtrl = &testingSubmgrControl{}
-	mainCtrl.RmrControl.Init("SUBMGRCTL", rtfile, port, rtport)
+	mainCtrl.RmrControl.Init("SUBMGRCTL", srcId, rtgSvc)
 	mainCtrl.c = NewControl()
 	xapp.SetReadyCB(mainCtrl.ReadyCB, nil)
 	go xapp.RunWithParams(mainCtrl.c, false)
diff --git a/pkg/control/ut_test.go b/pkg/control/ut_test.go
index 05d34b8..b1f9889 100644
--- a/pkg/control/ut_test.go
+++ b/pkg/control/ut_test.go
@@ -23,6 +23,7 @@
 	"gerrit.o-ran-sc.org/r/ric-plt/submgr/pkg/teststub"
 	"gerrit.o-ran-sc.org/r/ric-plt/submgr/pkg/teststubdummy"
 	"gerrit.o-ran-sc.org/r/ric-plt/submgr/pkg/teststube2ap"
+	"gerrit.o-ran-sc.org/r/ric-plt/submgr/pkg/xapptweaks"
 	"os"
 	"testing"
 )
@@ -110,77 +111,78 @@
 	//
 	// NOTE3: Ports per entity:
 	//
-	// DataPort Entity
-	// RoutePort (svc) will be DataPort+1
+	// Entity
 	// -------------------
-	// 14560   submgr
-	// 15560   e2term1 stub
-	// 15660   e2term2 stub
-	// 13560   xapp1 stub
-	// 13660   xapp2 stub
-	// 16560   dummy stub
-	//
+
+	mainsrc := teststub.RmrSrcId{xapptweaks.RmrEndpoint{"localhost", 14560}}
+	xapp1src := teststub.RmrSrcId{xapptweaks.RmrEndpoint{"localhost", 13560}}
+	xapp2src := teststub.RmrSrcId{xapptweaks.RmrEndpoint{"localhost", 13660}}
+	e2term1src := teststub.RmrSrcId{xapptweaks.RmrEndpoint{"localhost", 15560}}
+	e2term2src := teststub.RmrSrcId{xapptweaks.RmrEndpoint{"localhost", 15660}}
+	dummysrc := teststub.RmrSrcId{xapptweaks.RmrEndpoint{"localhost", 16560}}
+
 	//---------------------------------
 	rt := &teststub.RmrRouteTable{}
-	rt.AddRoute(12010, "", -1, "localhost:14560")
-	rt.AddRoute(12010, "localhost:14560", -1, "%meid")
-	rt.AddRoute(12011, "localhost:15560", -1, "localhost:14560")
-	rt.AddRoute(12012, "localhost:15560", -1, "localhost:14560")
-	rt.AddRoute(12011, "localhost:15660", -1, "localhost:14560")
-	rt.AddRoute(12012, "localhost:15660", -1, "localhost:14560")
-	rt.AddRoute(12011, "localhost:14560", -1, "localhost:13660;localhost:13560")
-	rt.AddRoute(12012, "localhost:14560", -1, "localhost:13660;localhost:13560")
-	rt.AddRoute(12020, "", -1, "localhost:14560")
-	rt.AddRoute(12020, "localhost:14560", -1, "%meid")
-	rt.AddRoute(12021, "localhost:15560", -1, "localhost:14560")
-	rt.AddRoute(12022, "localhost:15560", -1, "localhost:14560")
-	rt.AddRoute(12021, "localhost:15660", -1, "localhost:14560")
-	rt.AddRoute(12022, "localhost:15660", -1, "localhost:14560")
-	rt.AddRoute(12021, "localhost:14560", -1, "localhost:13660;localhost:13560")
-	rt.AddRoute(12022, "localhost:14560", -1, "localhost:13660;localhost:13560")
-	rt.AddRoute(55555, "", -1, "localhost:13660;localhost:13560;localhost:15560;localhost:15660;localhost:16560")
+	rt.AddRoute(12010, "", -1, mainsrc.String())
+	rt.AddRoute(12010, mainsrc.String(), -1, "%meid")
+	rt.AddRoute(12011, e2term1src.String(), -1, mainsrc.String())
+	rt.AddRoute(12012, e2term1src.String(), -1, mainsrc.String())
+	rt.AddRoute(12011, e2term2src.String(), -1, mainsrc.String())
+	rt.AddRoute(12012, e2term2src.String(), -1, mainsrc.String())
+	rt.AddRoute(12011, mainsrc.String(), -1, xapp2src.String()+";"+xapp1src.String())
+	rt.AddRoute(12012, mainsrc.String(), -1, xapp2src.String()+";"+xapp1src.String())
+	rt.AddRoute(12020, "", -1, mainsrc.String())
+	rt.AddRoute(12020, mainsrc.String(), -1, "%meid")
+	rt.AddRoute(12021, e2term1src.String(), -1, mainsrc.String())
+	rt.AddRoute(12022, e2term1src.String(), -1, mainsrc.String())
+	rt.AddRoute(12021, e2term2src.String(), -1, mainsrc.String())
+	rt.AddRoute(12022, e2term2src.String(), -1, mainsrc.String())
+	rt.AddRoute(12021, mainsrc.String(), -1, xapp2src.String()+";"+xapp1src.String())
+	rt.AddRoute(12022, mainsrc.String(), -1, xapp2src.String()+";"+xapp1src.String())
+	rt.AddRoute(55555, "", -1, xapp2src.String()+";"+xapp1src.String()+";"+e2term1src.String()+";"+e2term2src.String()+";"+dummysrc.String())
 
-	rt.AddMeid("localhost:15560", []string{"RAN_NAME_1", "RAN_NAME_2"})
-	rt.AddMeid("localhost:15660", []string{"RAN_NAME_11", "RAN_NAME_12"})
+	rt.AddMeid(e2term1src.String(), []string{"RAN_NAME_1", "RAN_NAME_2"})
+	rt.AddMeid(e2term2src.String(), []string{"RAN_NAME_11", "RAN_NAME_12"})
 
-	rtfilename, _ := teststub.CreateTmpFile(rt.GetTable())
-	defer os.Remove(rtfilename)
-	tent.Logger.Info("table[%s]", rt.GetTable())
+	rt.Enable()
+	defer rt.Disable()
+	tent.Logger.Info("rttable[%s]", rt.Table())
+
 	//---------------------------------
 	//
 	//---------------------------------
 	tent.Logger.Info("### submgr ctrl run ###")
-	mainCtrl = createSubmgrControl(rtfilename, 14560, 0)
+	mainCtrl = createSubmgrControl(mainsrc, teststub.RmrRtgSvc{})
 
 	//---------------------------------
 	//
 	//---------------------------------
 	tent.Logger.Info("### xapp1 stub run ###")
-	xappConn1 = teststube2ap.CreateNewE2Stub("xappstub1", rtfilename, 13560, 0, "RMRXAPP1STUB", 55555)
+	xappConn1 = teststube2ap.CreateNewE2Stub("xappstub1", xapp1src, teststub.RmrRtgSvc{}, "RMRXAPP1STUB", 55555)
 
 	//---------------------------------
 	//
 	//---------------------------------
 	tent.Logger.Info("### xapp2 stub run ###")
-	xappConn2 = teststube2ap.CreateNewE2Stub("xappstub2", rtfilename, 13660, 0, "RMRXAPP2STUB", 55555)
+	xappConn2 = teststube2ap.CreateNewE2Stub("xappstub2", xapp2src, teststub.RmrRtgSvc{}, "RMRXAPP2STUB", 55555)
 
 	//---------------------------------
 	//
 	//---------------------------------
 	tent.Logger.Info("### e2term1 stub run ###")
-	e2termConn1 = teststube2ap.CreateNewE2termStub("e2termstub1", rtfilename, 15560, 0, "RMRE2TERMSTUB1", 55555)
+	e2termConn1 = teststube2ap.CreateNewE2termStub("e2termstub1", e2term1src, teststub.RmrRtgSvc{}, "RMRE2TERMSTUB1", 55555)
 
 	//---------------------------------
 	//
 	//---------------------------------
 	tent.Logger.Info("### e2term2 stub run ###")
-	e2termConn2 = teststube2ap.CreateNewE2termStub("e2termstub2", rtfilename, 15660, 0, "RMRE2TERMSTUB2", 55555)
+	e2termConn2 = teststube2ap.CreateNewE2termStub("e2termstub2", e2term2src, teststub.RmrRtgSvc{}, "RMRE2TERMSTUB2", 55555)
 
 	//---------------------------------
 	// Just to test dummy stub
 	//---------------------------------
 	tent.Logger.Info("### dummy stub run ###")
-	dummystub = teststubdummy.CreateNewRmrDummyStub("dummystub", rtfilename, 16560, 0, "DUMMYSTUB", 55555)
+	dummystub = teststubdummy.CreateNewRmrDummyStub("dummystub", dummysrc, teststub.RmrRtgSvc{}, "DUMMYSTUB", 55555)
 
 	//---------------------------------
 	// Testing message sending
diff --git a/pkg/teststub/controlRmr.go b/pkg/teststub/controlRmr.go
index 41a6606..18b821e 100644
--- a/pkg/teststub/controlRmr.go
+++ b/pkg/teststub/controlRmr.go
@@ -20,9 +20,6 @@
 
 import (
 	"fmt"
-	"gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/xapp"
-	"os"
-	"strconv"
 	"testing"
 )
 
@@ -31,9 +28,9 @@
 //-----------------------------------------------------------------------------
 type RmrControl struct {
 	TestWrapper
-	syncChan  chan struct{}
-	DataPort  uint16
-	RoutePort uint16
+	RmrSrcId
+	RmrRtgSvc
+	syncChan chan struct{}
 }
 
 func (tc *RmrControl) ReadyCB(data interface{}) {
@@ -45,20 +42,15 @@
 	<-tc.syncChan
 }
 
-func (tc *RmrControl) Init(desc string, rtfile string, port uint16, rtport uint16) {
+func (tc *RmrControl) Init(desc string, srcId RmrSrcId, rtgSvc RmrRtgSvc) {
 	tc.TestWrapper.Init(desc)
-	tc.DataPort = port
-	tc.RoutePort = rtport
-	os.Setenv("RMR_SEED_RT", rtfile)
-	xapp.Logger.Info("Using rt file %s", os.Getenv("RMR_SEED_RT"))
-	if tc.DataPort > 0 {
-		os.Setenv("RMR_SRC_ID", "localhost:"+strconv.FormatUint(uint64(tc.DataPort), 10))
-		xapp.Logger.Info("Using src id  %s", os.Getenv("RMR_SRC_ID"))
-	}
-	if tc.RoutePort > 0 {
-		os.Setenv("RMR_RTG_SVC", "localhost:"+strconv.FormatUint(uint64(tc.RoutePort), 10))
-		xapp.Logger.Info("Using rtg svc  %s", os.Getenv("RMR_RTG_SVC"))
-	}
+
+	tc.RmrSrcId = srcId
+	tc.RmrSrcId.Enable()
+
+	tc.RmrRtgSvc = rtgSvc
+	tc.RmrRtgSvc.Enable()
+
 	tc.syncChan = make(chan struct{})
 }
 
diff --git a/pkg/teststub/controlRmrStub.go b/pkg/teststub/controlRmrStub.go
index f14bd1f..0f207e8 100644
--- a/pkg/teststub/controlRmrStub.go
+++ b/pkg/teststub/controlRmrStub.go
@@ -68,14 +68,14 @@
 	}
 }
 
-func (tc *RmrStubControl) Init(desc string, rtfile string, port uint16, rtport uint16, stat string, initMsg int) {
+func (tc *RmrStubControl) Init(desc string, srcId RmrSrcId, rtgSvc RmrRtgSvc, stat string, initMsg int) {
 	tc.InitMsg = initMsg
 	tc.Active = false
 	tc.RecvChan = make(chan *xapptweaks.RMRParams)
-	tc.RmrControl.Init(desc, rtfile, port, rtport)
+	tc.RmrControl.Init(desc, srcId, rtgSvc)
 	tc.RmrWrapper.Init()
 
-	tc.Rmr = xapp.NewRMRClientWithParams("tcp:"+strconv.FormatUint(uint64(port), 10), 65534, 1, 0, stat)
+	tc.Rmr = xapp.NewRMRClientWithParams("tcp:"+strconv.FormatUint(uint64(srcId.Port), 10), 65534, 1, 0, stat)
 	tc.Rmr.SetReadyCB(tc.ReadyCB, nil)
 	go tc.Rmr.Start(tc)
 
diff --git a/pkg/teststub/rmrenv.go b/pkg/teststub/rmrenv.go
new file mode 100644
index 0000000..5a57b56
--- /dev/null
+++ b/pkg/teststub/rmrenv.go
@@ -0,0 +1,148 @@
+/*
+==================================================================================
+  Copyright (c) 2019 AT&T Intellectual Property.
+  Copyright (c) 2019 Nokia
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+==================================================================================
+*/
+
+package teststub
+
+import (
+	"gerrit.o-ran-sc.org/r/ric-plt/submgr/pkg/xapptweaks"
+	"gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/xapp"
+	"os"
+	"strconv"
+)
+
+//-----------------------------------------------------------------------------
+//
+//-----------------------------------------------------------------------------
+
+type RmrRouteTable struct {
+	tmpfile string
+	routes  []string
+	meids   []string
+}
+
+func (rrt *RmrRouteTable) AddRoute(mtype int, src string, subid int, trg string) {
+
+	line := "mse|"
+	line += strconv.FormatInt(int64(mtype), 10)
+	if len(src) > 0 {
+		line += "," + src
+	}
+	line += "|"
+	line += strconv.FormatInt(int64(subid), 10)
+	line += "|"
+	line += trg
+	rrt.routes = append(rrt.routes, line)
+}
+
+func (rrt *RmrRouteTable) AddMeid(trg string, meids []string) {
+
+	line := "mme_ar"
+	line += "|"
+	line += trg
+	line += "|"
+	for _, str := range meids {
+		line += " " + str
+	}
+	rrt.meids = append(rrt.meids, line)
+}
+
+func (rrt *RmrRouteTable) DelMeid(meids []string) {
+
+	line := "mme_del"
+	line += "|"
+	for _, str := range meids {
+		line += " " + str
+	}
+	rrt.meids = append(rrt.meids, line)
+}
+
+func (rrt *RmrRouteTable) FileName() string {
+	return rrt.tmpfile
+}
+
+func (rrt *RmrRouteTable) Table() string {
+	allrt := "newrt|start\n"
+	for _, val := range rrt.routes {
+		allrt += val + "\n"
+	}
+	allrt += "newrt|end\n"
+	allrt += "meid_map | start\n"
+	for _, val := range rrt.meids {
+		allrt += val + "\n"
+	}
+	allrt += "meid_map | end | " + strconv.FormatInt(int64(len(rrt.meids)), 10) + "\n"
+	return allrt
+}
+
+func (rrt *RmrRouteTable) Enable() {
+	if len(rrt.tmpfile) > 0 {
+		os.Remove(rrt.tmpfile)
+	}
+	rrt.tmpfile, _ = CreateTmpFile(rrt.Table())
+	os.Setenv("RMR_SEED_RT", rrt.tmpfile)
+	xapp.Logger.Info("Using rt file %s", os.Getenv("RMR_SEED_RT"))
+}
+
+func (rrt *RmrRouteTable) Disable() {
+	if len(rrt.tmpfile) > 0 {
+		os.Remove(rrt.tmpfile)
+		os.Unsetenv("RMR_SEED_RT")
+		rrt.tmpfile = ""
+		xapp.Logger.Info("Not using rt file ")
+	}
+}
+
+//-----------------------------------------------------------------------------
+//
+//-----------------------------------------------------------------------------
+
+type RmrSrcId struct {
+	xapptweaks.RmrEndpoint
+}
+
+func (rsi *RmrSrcId) Enable() {
+	if rsi.Port > 0 {
+		os.Setenv("RMR_SRC_ID", rsi.String())
+		xapp.Logger.Info("Using src id  %s", os.Getenv("RMR_SRC_ID"))
+	}
+}
+
+func (rsi *RmrSrcId) Disable() {
+	os.Unsetenv("RMR_SRC_ID")
+	xapp.Logger.Info("Not using Using src id")
+}
+
+//-----------------------------------------------------------------------------
+//
+//-----------------------------------------------------------------------------
+type RmrRtgSvc struct {
+	xapptweaks.RmrEndpoint
+}
+
+func (rrs *RmrRtgSvc) Enable() {
+	if rrs.Port > 0 {
+		os.Setenv("RMR_RTG_SVC", rrs.String())
+		xapp.Logger.Info("Using rtg svc  %s", os.Getenv("RMR_SRC_ID"))
+	}
+}
+
+func (rrs *RmrRtgSvc) Disable() {
+	os.Unsetenv("RMR_RTG_SVC")
+	xapp.Logger.Info("Not using Using rtg svc")
+}
diff --git a/pkg/teststub/rmrroutetable.go b/pkg/teststub/rmrroutetable.go
deleted file mode 100644
index 281110c..0000000
--- a/pkg/teststub/rmrroutetable.go
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
-==================================================================================
-  Copyright (c) 2019 AT&T Intellectual Property.
-  Copyright (c) 2019 Nokia
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-==================================================================================
-*/
-
-package teststub
-
-import (
-	"strconv"
-)
-
-//-----------------------------------------------------------------------------
-//
-//-----------------------------------------------------------------------------
-
-type RmrRouteTable struct {
-	routes []string
-	meids  []string
-}
-
-func (rrt *RmrRouteTable) AddRoute(mtype int, src string, subid int, trg string) {
-
-	line := "mse|"
-	line += strconv.FormatInt(int64(mtype), 10)
-	if len(src) > 0 {
-		line += "," + src
-	}
-	line += "|"
-	line += strconv.FormatInt(int64(subid), 10)
-	line += "|"
-	line += trg
-	rrt.routes = append(rrt.routes, line)
-}
-
-func (rrt *RmrRouteTable) AddMeid(trg string, meids []string) {
-
-	line := "mme_ar"
-	line += "|"
-	line += trg
-	line += "|"
-	for _, str := range meids {
-		line += " " + str
-	}
-	rrt.meids = append(rrt.meids, line)
-}
-
-func (rrt *RmrRouteTable) DelMeid(meids []string) {
-
-	line := "mme_del"
-	line += "|"
-	for _, str := range meids {
-		line += " " + str
-	}
-	rrt.meids = append(rrt.meids, line)
-}
-
-func (rrt *RmrRouteTable) GetTable() string {
-	allrt := "newrt|start\n"
-	for _, val := range rrt.routes {
-		allrt += val + "\n"
-	}
-	allrt += "newrt|end\n"
-	allrt += "meid_map | start\n"
-	for _, val := range rrt.meids {
-		allrt += val + "\n"
-	}
-	allrt += "meid_map | end | " + strconv.FormatInt(int64(len(rrt.meids)), 10) + "\n"
-	return allrt
-}
diff --git a/pkg/teststubdummy/stubRmrDummy.go b/pkg/teststubdummy/stubRmrDummy.go
index c4745ba..b3b4352 100644
--- a/pkg/teststubdummy/stubRmrDummy.go
+++ b/pkg/teststubdummy/stubRmrDummy.go
@@ -42,9 +42,9 @@
 //-----------------------------------------------------------------------------
 //
 //-----------------------------------------------------------------------------
-func CreateNewRmrDummyStub(desc string, rtfile string, port uint16, rtport uint16, stat string, mtypeseed int) *RmrDummyStub {
+func CreateNewRmrDummyStub(desc string, srcId teststub.RmrSrcId, rtgSvc teststub.RmrRtgSvc, stat string, mtypeseed int) *RmrDummyStub {
 	dummyStub := &RmrDummyStub{}
-	dummyStub.RmrStubControl.Init(desc, rtfile, port, rtport, stat, mtypeseed)
+	dummyStub.RmrStubControl.Init(desc, srcId, rtgSvc, stat, mtypeseed)
 	dummyStub.reqMsg = mtypeseed + 1
 	dummyStub.respMsg = mtypeseed + 2
 	return dummyStub
@@ -54,14 +54,18 @@
 //
 //-----------------------------------------------------------------------------
 
-func (tc *RmrDummyStub) SendReq(t *testing.T) {
+func (tc *RmrDummyStub) SendReq(t *testing.T, plen int) {
 	tc.Logger.Info("SendReq")
-	var dummyBuf []byte = make([]byte, 100)
+	len := plen
+	if len == 0 {
+		len = 100
+	}
 	params := xapptweaks.NewParams(nil)
 	params.Mtype = tc.reqMsg
 	params.SubId = -1
-	params.Payload = dummyBuf
-	params.PayloadLen = 100
+
+	params.Payload = make([]byte, len)
+	params.PayloadLen = 0
 	params.Meid = &xapp.RMRMeid{RanName: "TEST"}
 	params.Xid = "TEST"
 	params.Mbuf = nil
@@ -73,6 +77,44 @@
 	return
 }
 
+func (tc *RmrDummyStub) SendResp(t *testing.T, plen int) {
+	tc.Logger.Info("SendReq")
+	len := plen
+	if len == 0 {
+		len = 100
+	}
+	params := xapptweaks.NewParams(nil)
+	params.Mtype = tc.respMsg
+	params.SubId = -1
+	params.Payload = make([]byte, len)
+	params.PayloadLen = 0
+	params.Meid = &xapp.RMRMeid{RanName: "TEST"}
+	params.Xid = "TEST"
+	params.Mbuf = nil
+
+	snderr := tc.RmrSend(params, 5)
+	if snderr != nil {
+		tc.TestError(t, "%s", snderr.Error())
+	}
+	return
+}
+
+func (tc *RmrDummyStub) RecvReq(t *testing.T) bool {
+	tc.Logger.Info("RecvReq")
+
+	msg := tc.WaitMsg(15)
+	if msg != nil {
+		if msg.Mtype != tc.reqMsg {
+			tc.TestError(t, "Received wrong mtype expected %d got %d, error", tc.reqMsg, msg.Mtype)
+			return false
+		}
+		return true
+	} else {
+		tc.TestError(t, "Not Received msg within %d secs", 15)
+	}
+	return false
+}
+
 func (tc *RmrDummyStub) RecvResp(t *testing.T) bool {
 	tc.Logger.Info("RecvResp")
 
@@ -88,27 +130,3 @@
 	}
 	return false
 }
-
-//-----------------------------------------------------------------------------
-//
-//-----------------------------------------------------------------------------
-func RmrDummyHandleMessage(msg *xapptweaks.RMRParams, mtypeseed int, rmr xapptweaks.XAppWrapperIf) (bool, error) {
-	if msg.Mtype == mtypeseed+1 {
-		var dummyBuf []byte = make([]byte, 100)
-		params := xapptweaks.NewParams(nil)
-		params.Mtype = mtypeseed + 2
-		params.SubId = msg.SubId
-		params.Payload = dummyBuf
-		params.PayloadLen = 100
-		params.Meid = msg.Meid
-		params.Xid = msg.Xid
-		params.Mbuf = nil
-		rmr.GetLogger().Info("SEND DUMMY RESP: %s", params.String())
-		err := rmr.RmrSend(params, 5)
-		if err != nil {
-			rmr.GetLogger().Error("RmrDummyHandleMessage: err(%s)", err.Error())
-		}
-		return true, err
-	}
-	return false, nil
-}
diff --git a/pkg/teststube2ap/stubE2.go b/pkg/teststube2ap/stubE2.go
index c99df73..5804f74 100644
--- a/pkg/teststube2ap/stubE2.go
+++ b/pkg/teststube2ap/stubE2.go
@@ -54,9 +54,9 @@
 //-----------------------------------------------------------------------------
 //
 //-----------------------------------------------------------------------------
-func CreateNewE2Stub(desc string, rtfile string, port uint16, rtport uint16, stat string, mtypeseed int) *E2Stub {
+func CreateNewE2Stub(desc string, srcId teststub.RmrSrcId, rtgSvc teststub.RmrRtgSvc, stat string, mtypeseed int) *E2Stub {
 	tc := &E2Stub{}
-	tc.RmrStubControl.Init(desc, rtfile, port, rtport, stat, mtypeseed)
+	tc.RmrStubControl.Init(desc, srcId, rtgSvc, stat, mtypeseed)
 	tc.xid_seq = 1
 	tc.SetCheckXid(true)
 	return tc
@@ -65,9 +65,9 @@
 //-----------------------------------------------------------------------------
 //
 //-----------------------------------------------------------------------------
-func CreateNewE2termStub(desc string, rtfile string, port uint16, rtport uint16, stat string, mtypeseed int) *E2Stub {
+func CreateNewE2termStub(desc string, srcId teststub.RmrSrcId, rtgSvc teststub.RmrRtgSvc, stat string, mtypeseed int) *E2Stub {
 	tc := &E2Stub{}
-	tc.RmrStubControl.Init(desc, rtfile, port, rtport, stat, mtypeseed)
+	tc.RmrStubControl.Init(desc, srcId, rtgSvc, stat, mtypeseed)
 	tc.xid_seq = 1
 	tc.SetCheckXid(false)
 	return tc
