Unable to read the elements in MockContentFragment object.
Created the below content fragment json.
{
"jcr:primaryType": "cq:ContentFragment",
"jcr:content": {
"jcr:primaryType": "nt:unstructured",
"title": "My Test Content Fragment",
"description": "This is a test content fragment for JUnit.",
"elements": {
"jcr:primaryType": "nt:unstructured",
"headline": {
"jcr:primaryType": "nt:unstructured",
"value": "Test Headline"
},
"body": {
"jcr:primaryType": "nt:unstructured",
"value": "<p>This is the body text of the content fragment.</p>"
}
}
}
}