in core/src/main/java/org/apache/sling/testing/mock/sling/loader/ContentLoader.java [721:732]
private void registerFileSystemResourceProvider(Object... serviceProperties) {
if (bundleContext == null) {
throw new IllegalStateException("No bundle context given for content loader.");
}
if (isUsingMockResourceResolverFactory()) {
throw new IllegalStateException("Loading folder content is not supported with RESOURCERESOLVER_MOCK resource resolver type. "
+ "Use RESOURCEPROVIDER_MOCK or one of the other types.");
}
Dictionary<String,Object> props = MapUtil.toDictionary(serviceProperties);
FsResourceProvider service = MockOsgi.activateInjectServices(FsResourceProvider.class, bundleContext, props);
bundleContext.registerService(ResourceProvider.class, service, props);
}