@Vishal_Jain03 use @Mock instead of @reference
Make sure that you setup any objects / object attributes in the Setup method (this is the one with @BeforeEach annotation)
For instance, if you need the ResourceResolver from the ResoruceResolverFactory mock object, the inside the setup method, you sh...