Vijayalakshmi_S - The below line did the magic. aemContext.registerAdapter(ResourceResolver.class, QueryBuilder.class, queryBuilder); I was getting queryBuilder as null and I spent almost a day to debug this issue. I double check all mock and everything but issue did not solve. After adding this ...