nullpointer exception, when we call modelFactory.exportModelForResource

Description

always getting null value when try to get the values from modelFactory.exportModelForResource();
@Mock
private ModelFactory modelFactory;

String Json="{description=games, sling:resourceType=warner/components/games, jcr:primaryType=nt:unstructured, title=gamescomponent}";
Ex:lenient().when(modelFactory.exportModelForResource(context.currentResource(), "jackson", String.class, new HashMap<String,String>())).thenReturn(json);

https://pastebin.com/X7j4GSMB--test class

https://pastebin.com/ewvexFSJ--json

Assignee

Unassigned

Reporter

mupparaj

Labels

None

Components

Affects versions

Priority

Minor
Configure