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

Activity

Show:
mupparaj
June 3, 2020, 12:24 PM

issue got resolved

Stefan Seifert
June 3, 2020, 12:51 PM

if i understand correctly it was not an issue in AEM Mocks

Cannot Reproduce

Assignee

Unassigned

Reporter

mupparaj

Labels

None

Components

Affects versions

Priority

Minor
Configure