mockJSON.message(0).body().isInstanceOf(byte[].class);
Object json = template.requestBody("direct:marshalInlineOptionsArray", "<ar><el>1</el><el>2</el><el>3</el><el>4</el></ar>");
String jsonString = context.getTypeConverter().convertTo(String.class, json);
JSONArray array = (JSONArray) JSONSerializer.toJSON(jsonString);
assertTrue("Expected a JSON array with string elements: 1, 2, 3, 4", array.containsAll(Arrays.asList("1", "2", "3", "4")));
mockJSON.assertIsSatisfied();
}
@Override
protected RouteBuilder createRouteBuilder() throws Exception {