// context
MockResourceResolverFactoryActivator activator = new MockResourceResolverFactoryActivator();
activator.bindResourceProvider(resourceProvider,
getServiceReferenceProperties(resourceProviderServiceReference));
activator.activate(componentContext);
CommonResourceResolverFactoryImpl commonFactoryImpl = new CommonResourceResolverFactoryImpl(activator);
ResourceResolverContext context = new ResourceResolverContext(true, authenticationInfo, new ResourceAccessSecurityTracker());
ResourceResolverImpl resourceResolver = new ResourceResolverImpl(commonFactoryImpl, context);
return resourceResolver;
}