@Override
    public BundleContext bundleContext() {
        if (restrictedBundleContext == null) {
            throw newException();
        }
        return restrictedBundleContext;
    }
@Test
    void require_that_bundleContext_throws_exception() throws BundleException {
        assertThrows(RuntimeException.class, () -> {
            new DisableOsgiFramework().bundleContext();
        });
    }