Index: geniuswebcore/test/geniusweb/references/ParametersTest.py
===================================================================
--- geniuswebcore/test/geniusweb/references/ParametersTest.py	(revision 66)
+++ geniuswebcore/test/geniusweb/references/ParametersTest.py	(revision 67)
@@ -1,38 +1,92 @@
+import json
+from typing import List
 import unittest
 
 from pyson.ObjectMapper import ObjectMapper
+from unitpy.GeneralTests import GeneralTests
 
 from geniusweb.references.Parameters import Parameters
 
 
-class ParametersTest (unittest.TestCase) :
+class ParametersTest (unittest.TestCase, GeneralTests[Parameters]) :
 	pyson=ObjectMapper()
-	params=Parameters({'a':1})
-	params1=Parameters({'a':1})
-	params2=Parameters()
+	params1=Parameters()
+	params1a=Parameters()
+	params2=Parameters({'a':1, 'b':2.0})
 
-	paramsjson={'a':1}
+	paramsjson='{"a":1, "b":2.0}'
+
+	def getGeneralTestData(self)-> List[List[Parameters]] :
+		return [[ self.params1, self.params1a],[self.params2]]
+
+	def getGeneralTestStrings(self)->List[str]:
+		return ["\\{\\}", "\\{a=1, b=2.0\\}"]
+
 
 	def testGet(self):
-		self.assertEqual({'a':1}, self.params.getParameters())
+		self.assertEqual({'a':1, 'b':2.0}, self.params2.getParameters())
 		
+
+	def testGetWrongClass(self):
+		self.assertRaises(ValueError, lambda:self.params2.getType("a", str))
+
+	def testGetInteger(self) :
+		self.assertEqual(1, self.params2.getType("a", int))
+		self.assertEqual(2.0, self.params2.getType("b", float))
+
+	def testGetDouble(self):
+		self.assertEquals( 2., self.params2.getDouble("b", 7.0, None, None))
+		self.assertEquals(2., self.params2.getDouble("b", 7.0, 0., 4.))
+
+		# test outside range
+		self.assertEqual(7., self.params2.getDouble("b", 7., 4., 6.))
+		self.assertEqual(7., self.params2.getDouble("b", 7., -2., 1.))
+
+		# test fallback None
+		self.assertEqual(None, self.params2.getDouble("b", None, 4., 6.))
+
+	def testGetDoubleWithErrors(self):
+		# a does not contain a double
+		self.assertEqual(7., self.params2.getDouble("a", 7., 4., 6.));
+		# c does not exist
+		self.assertEqual(7., self.params2.getDouble("c", 7., 4., 6.));
+
+	def testWith(self):
+		p = self.params2.With("a", 2)
+		self.assertEqual(1, self.params2.get("a"))
+		self.assertEqual(2., self.params2.get("b"))
+		self.assertEqual(2, p.get("a"))
+		self.assertEqual(2., p.get("b"))
+
+	def testWithParams(self):
+		upd = Parameters().With("a", 2)
+		p = self.params2.WithParameters(upd)
+		self.assertEqual(1, self.params2.get("a"))
+		self.assertEqual(2., self.params2.get("b"))
+		self.assertEqual(2, p.get("a"))
+		self.assertEqual(2., p.get("b"))
+
+	def testIsEmpty(self) :
+		self.assertTrue(self.params1.isEmpty())
+		self.assertFalse(self.params2.isEmpty())
+
+	def testContainsKey(self):
+		self.assertTrue(self.params2.containsKey("a"))
+		self.assertFalse(self.params2.containsKey("c"))
+
+
 	def testSerialize(self):
-		print(str(self.pyson.toJson(self.params)))
-		self.assertEqual(self.paramsjson, self.pyson.toJson(self.params))
+		print(str(self.pyson.toJson(self.params2)))
+		self.assertEqual(json.loads(self.paramsjson), self.pyson.toJson(self.params2))
 		
 	def testDeserialize(self):
-		self.assertEqual(self.params, self.pyson.parse(self.paramsjson, Parameters))
+		self.assertEqual(self.params2, self.pyson.parse(json.loads(self.paramsjson), Parameters))
 	
-	def testRepr(self):
-		self.assertEqual("{'a': 1}", repr(self.params))
 		
-	def testEqual(self):
-		self.assertEqual(self.params, self.params1)
-		self.assertNotEqual(self.params, self.params2)
-		self.assertEqual(hash(self.params), hash(self.params1))
-		self.assertNotEqual(hash(self.params), hash(self.params2))
+	def testWith2(self):
+		p=Parameters({'a':1}).With('b', 2)
+		self.assertEqual({'a':1, 'b':2}, p.getParameters())
 		
+	def testParamNotAvailable(self):
+		self.assertEqual(None, self.params1.get("nosuchkey"))
 		
-	def testWith(self):
-		p=self.params.With('b', 2)
-		self.assertEqual({'a':1, 'b':2}, p.getParameters())
Index: geniuswebcore/test/geniusweb/references/PartiWithParamsTest.py
===================================================================
--- geniuswebcore/test/geniusweb/references/PartiWithParamsTest.py	(revision 67)
+++ geniuswebcore/test/geniusweb/references/PartiWithParamsTest.py	(revision 67)
@@ -0,0 +1,43 @@
+import json
+from typing import List
+import unittest
+
+from pyson.ObjectMapper import ObjectMapper
+from unitpy.GeneralTests import GeneralTests
+from uri.uri import URI
+
+from geniusweb.references.Parameters import Parameters
+from geniusweb.references.PartyRef import PartyRef
+from geniusweb.references.PartyWithParameters import PartyWithParameters
+
+
+class PartiWithParamsTest (unittest.TestCase, GeneralTests[PartyWithParameters]):
+	serialized = "{\"partyref\":\"ws:party1\",\"parameters\":{\"a\":1}}";
+
+	party1 =  PartyRef( URI("ws:party1"))
+	party2 =  PartyRef( URI("ws:party2"))
+	param1 =  Parameters()
+	param2 =  Parameters().With("a", 1)
+	party1param1 =  PartyWithParameters(party1, param1)
+	party1param1a = PartyWithParameters(party1, param1)
+	party1param2 =  PartyWithParameters(party1, param2)
+
+	def getGeneralTestData(self)->List[List[PartyWithParameters]]:
+		return [[	self.party1param1, self.party1param1a, self.party1param1a],
+				[self.party1param2]]
+
+	def getGeneralTestStrings(self) ->List[str] :
+		return ["PartyRef.ws:party1.","PartyRef.ws:party1.\\{a=1\\}"]
+
+	def testSerialize(self) :
+		jackson = ObjectMapper()
+
+		jsonobj = jackson.toJson(self.party1param2)
+		print(jsonobj)
+		self.assertEqual(json.loads(self.serialized), jsonobj)
+
+	def testDeserialize(self):
+		jackson = ObjectMapper()
+		p = jackson.parse(json.loads(self.serialized), PartyWithParameters)
+		print(p)
+		self.assertEqual(self.party1param2, p)
Index: geniuswebcore/test/geniusweb/references/PartyRefTest.py
===================================================================
--- geniuswebcore/test/geniusweb/references/PartyRefTest.py	(revision 67)
+++ geniuswebcore/test/geniusweb/references/PartyRefTest.py	(revision 67)
@@ -0,0 +1,46 @@
+import json
+from typing import List
+import unittest
+
+from pyson.ObjectMapper import ObjectMapper
+from unitpy.GeneralTests import GeneralTests
+from uri.uri import URI
+
+from geniusweb.references.PartyRef import PartyRef
+
+
+class PartyRefTest (unittest.TestCase, GeneralTests[PartyRef]):
+
+	asJson = "\"ws:localhost/party1\""
+
+	party1 =  PartyRef( URI("ws:localhost/party1"))
+	party1a = PartyRef( URI("ws:localhost/party1"))
+	party2 = PartyRef(URI("ws:localhost/party2"))
+	party3 = PartyRef( URI("http:localhost/party3"))
+
+
+	def getGeneralTestData(self) -> List[List[PartyRef]]:
+		return [ [self.party1, self.party1a],[self.party2], [self.party3]]
+
+	def getGeneralTestStrings(self) -> List[str] :
+		return ["PartyRef.*party1.", "PartyRef.*party2.",
+				"PartyRef.*party3."]
+
+	def testSmoke(self) :
+		PartyRef(URI("ws:localhost"))
+
+	def testNull(self):
+		self.assertRaises(ValueError, lambda:PartyRef(None))
+
+	def testSerialize(self) :
+		jackson = ObjectMapper()
+
+		jsonobj = jackson.toJson(self.party1)
+		print(json.dumps(jsonobj))
+		self.assertEqual(self.asJson, json.dumps(jsonobj))
+
+	def testDeserialize(self):
+		jackson = ObjectMapper()
+		p = jackson.parse(json.loads(self.asJson), PartyRef);
+		print(p)
+		self.assertEqual(self.party1, p)
Index: geniuswebcore/test/geniusweb/references/PartyWithProfileTest.py
===================================================================
--- geniuswebcore/test/geniusweb/references/PartyWithProfileTest.py	(revision 67)
+++ geniuswebcore/test/geniusweb/references/PartyWithProfileTest.py	(revision 67)
@@ -0,0 +1,70 @@
+import json
+from typing import List
+import unittest
+
+from pyson.ObjectMapper import ObjectMapper
+from unitpy.GeneralTests import GeneralTests
+from uri.uri import URI
+
+from geniusweb.references.Parameters import Parameters
+from geniusweb.references.PartyRef import PartyRef
+from geniusweb.references.PartyWithParameters import PartyWithParameters
+from geniusweb.references.PartyWithProfile import PartyWithProfile
+from geniusweb.references.ProfileRef import ProfileRef
+
+
+class PartyWithProfileTest (unittest.TestCase,  GeneralTests[PartyWithProfile]):
+
+	serialized = "{\"party\":{\"partyref\":\"ws:party1\",\"parameters\":{}},\"profile\":\"ws:profile1\"}"
+
+	party1 = PartyRef(URI("ws:party1"))
+	party1a =  PartyRef( URI("ws:party1"))
+	party2 =  PartyRef( URI("ws:party2"))
+	party3 = PartyRef( URI("http:party3"))
+
+	profile1 = ProfileRef(URI("ws:profile1"))
+	profile2 = ProfileRef( URI("ws:profile2"))
+
+	settings1 =  Parameters()
+	settings2 =  Parameters({"a": 1})
+
+	party1withparams1 =  PartyWithParameters(party1,settings1)
+	party1withparams2 =  PartyWithParameters(party1,settings2)
+	party2withparams1 =  PartyWithParameters(party2,settings1)
+
+	partyprof1 =  PartyWithProfile(party1withparams1, profile1)
+	partyprof1a =  PartyWithProfile(party1withparams1, profile1)
+	partyprof2 =  PartyWithProfile(party2withparams1, profile1)
+	partyprof3 =  PartyWithProfile(party1withparams1, profile2)
+	partyprof4 =  PartyWithProfile(party1withparams2, profile1)
+
+
+	def getGeneralTestData(self) -> List[List[PartyWithProfile]] :
+		return [[self.partyprof1, self.partyprof1a], [self.partyprof2],[self.partyprof3],
+				[self.partyprof4]]
+
+	def getGeneralTestStrings(self) -> List[str] :
+		return [
+				"PartyWithProfile.PartyRef.ws:party1.,ProfileRef.ws:profile1.*",
+				"PartyWithProfile.PartyRef.ws:party2.,ProfileRef.ws:profile1.*",
+				"PartyWithProfile.PartyRef.ws:party1.,ProfileRef.ws:profile2.*",
+				"PartyWithProfile.PartyRef.ws:party1.{a=1},ProfileRef.ws:profile1.*"]
+
+	def testSmoke(self) :
+		pass
+
+	def testNull(self) :
+		self.assertRaises(ValueError, lambda:PartyWithProfile(None, None))
+
+	def testSerialize(self) :
+		jackson = ObjectMapper()
+
+		jsonobj = jackson.toJson(self.partyprof1);
+		print(str(jsonobj))
+		self.assertEqual(json.loads(self.serialized), jsonobj);
+
+	def testDeserialize(self):
+		jackson = ObjectMapper()
+		p = jackson.parse(json.loads(self.serialized),	PartyWithProfile)
+		print(str(p))
+		self.assertEqual(self.partyprof1, p)
Index: geniuswebcore/test/geniusweb/references/ProfileRefTest.py
===================================================================
--- geniuswebcore/test/geniusweb/references/ProfileRefTest.py	(revision 66)
+++ geniuswebcore/test/geniusweb/references/ProfileRefTest.py	(revision 67)
@@ -2,5 +2,5 @@
 
 from pyson.ObjectMapper import ObjectMapper
-from uri import URI #type:ignore
+from uri.uri import URI #type:ignore
 from geniusweb.references.ProfileRef import ProfileRef
 
Index: geniuswebcore/test/geniusweb/references/ProtocolRefTest.py
===================================================================
--- geniuswebcore/test/geniusweb/references/ProtocolRefTest.py	(revision 66)
+++ geniuswebcore/test/geniusweb/references/ProtocolRefTest.py	(revision 67)
@@ -2,5 +2,5 @@
 
 from pyson.ObjectMapper import ObjectMapper
-from uri import URI #type:ignore
+from uri.uri import URI #type:ignore
 from geniusweb.references.ProtocolRef import ProtocolRef
 
