public class BundleExtTest extends TestCase {
public void test() {
final long bundleId = 32;
BundleExtUrlPostProcessor processor = new BundleExtUrlPostProcessor();
processor.setBundleContext((BundleContext) Proxy.newProxyInstance(getClass().getClassLoader(),
new Class[] { BundleContext.class },
new InvocationHandler() {
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
if ("getBundle".equals(method.getName())) {
return (Bundle) Proxy.newProxyInstance(getClass().getClassLoader(),