MockControl bundleContextControl = MockControl.createControl(BundleContext.class);
BundleContext context = (BundleContext) bundleContextControl.getMock();
// platform determination
// extracting bundle id from bundle
bundleContextControl.expectAndReturn(context.getBundle(), new MockBundle());
// look for existing resolved bundles
bundleContextControl.expectAndReturn(context.getBundles(), new Bundle[0], 2);
// register namespace and entity resolving service