vendredi 1 juillet 2016

How to add mock PaginatedList to List.addAll?

I have to add the PaginatedQueryList from to secondList which comes from dynamoDbMapper.query for testing. How can I achieve it?

List exampleList = secondList.addAll(dynamoDbMapper.query(MyDAOClass.class, queryExpression));

I tried to mock the PaginatedQueryList but am getting null pointer exception because elements in mocked PaginatedQueryList is empty.

Any suggestions please?

Aucun commentaire:

Enregistrer un commentaire