Added tests for gateway and json serializer