IsJsonFilter filter = (IsJsonFilter) muleContext.getRegistry().lookupObject("jsonFilter");
assertNotNull(filter);
assertTrue(filter.isValidateParsing());
ObjectToJson serializer = (ObjectToJson) muleContext.getRegistry().lookupObject("fruitCollectionToJson");
serializer.initialise();
assertNotNull(serializer);
assertEquals(String.class, serializer.getReturnClass());
assertEquals(FruitCollection.class, serializer.getSourceClass());
assertEquals(3, serializer.getSerializationMixins().size());
JsonToObject deserializer = (JsonToObject) muleContext.getRegistry().lookupObject("jsonToFruitCollection");
assertNotNull(deserializer);
assertEquals(FruitCollection.class, deserializer.getReturnClass());
assertEquals(1, deserializer.getDeserializationMixins().size());
//Test roundTrip
FruitCollection fc = JsonBeanRoundTripTestCase.JSON_OBJECT;
String result = (String)serializer.transform(fc);
assertNotNull(result);
// compare the structure and values but not the attributes' order
ObjectMapper mapper = new ObjectMapper();
JsonNode actualJsonNode = mapper.readTree(result);
JsonNode expectedJsonNode = mapper.readTree(JsonBeanRoundTripTestCase.JSON_STRING);