Hi All, Thanks for your response, now i was able to mock the resourceResolverFactory;now the way,i used was belowupdated the code in searchserviceImpl.class as below.and in My TestServlet doget() test method i updated as belownow im getting result as expected pfb,