Component component = Aura.getInstanceService().getInstance("test:test_SimpleJavaRenderer", ComponentDef.class,
null);
// Convert the instance to a format that is used by the client
String defInJson = Json.serialize(component, false, true);
// Convert back to the object, just like the client does in javascript
Object defObj = new JsonReader().read(defInJson);
assertTrue(defObj instanceof Map);
assertNotNull("Component Instance of components which use java renderers should have a rendering section",
((Map<?, ?>) ((Map<?, ?>) defObj).get("value")).get("rendering"));
assertEquals("Component markup seen in Component instance does not match the markup in Java Renderer",
TestSimpleRenderer.htmlOutput, ((Map<?, ?>) ((Map<?, ?>) defObj).get("value")).get("rendering"));