BusFactory factory = new CXFBusFactory() {
public Bus createBus(Map<Class<?>, Object> e, Map<String, Object> properties) {
return new ExtensionManagerBus(e, properties, this.getClass().getClassLoader());
}
};
Bus bus = factory.createBus();
assertNotNullExtensions(bus);
bus.shutdown(true);
} finally {
Thread.currentThread().setContextClassLoader(origClassLoader);
}