Change looseEquals to use json enconding instead of gob. Gob was failing for some cases. Change to a manual test that avoids looseEquals for types which are not supported by json enconding.