library/DIAMETER_Templates: rework existing ULR/ULA templates

* Make both {hbh,ete}_id parameters last among the others;
* Use more elegant and consistent template formatting;
* Make Origin{Host,Realm} values configurable;
* Make DestinationRealm value configurable;
* Make SessionId value configurable.

Change-Id: I0585e306a87453c212c6b5ac5635181c47b34b4f
Related: SYS#5602
diff --git a/mme/MME_Tests.ttcn b/mme/MME_Tests.ttcn
index f9bcf6d..2140971 100644
--- a/mme/MME_Tests.ttcn
+++ b/mme/MME_Tests.ttcn
@@ -493,14 +493,12 @@
 	var PDU_DIAMETER rx_dia;
 	[] DIAMETER.receive(tr_DIA_ULR(g_pars.ue_pars.imsi)) -> value rx_dia {
 		var template (omit) AVP avp;
-		var octetstring sess_id;
 		var hexstring imsi;
 		var template (value) AVP_list sub_data;
 
 		/* retrieve input data */
 		imsi := valueof(f_DIAMETER_get_imsi(rx_dia));
 		avp := f_DIAMETER_get_avp(rx_dia, c_AVP_Code_BASE_NONE_Session_Id);
-		sess_id := valueof(avp.avp_data.avp_BASE_NONE_Session_Id);
 
 		sub_data := {
 			ts_AVP_3GPP_SubscriberStatus(SERVICE_GRANTED),
@@ -513,7 +511,9 @@
 			})
 			};
 
-		DIAMETER.send(ts_DIA_ULA(rx_dia.hop_by_hop_id, rx_dia.end_to_end_id, sess_id, sub_data));
+		DIAMETER.send(ts_DIA_ULA(sub_data, avp.avp_data.avp_BASE_NONE_Session_Id,
+					 hbh_id := rx_dia.hop_by_hop_id,
+					 ete_id := rx_dia.end_to_end_id));
 	}
 }