private AtomicBoolean isDefault = new AtomicBoolean(false);
protected void setUp() throws Exception {
super.setUp();
GeronimoSecurityBuilderImpl securityBuilder = new GeronimoSecurityBuilderImpl(null, null, null);
MockBundleContext bundleContext = new MockBundleContext(getClass().getClassLoader(), "", null, null);
PackageAdmin packageAdmin = new PackageAdmin() {
@Override
public ExportedPackage[] getExportedPackages(Bundle bundle) {
return new ExportedPackage[0];
}
@Override
public ExportedPackage[] getExportedPackages(String s) {
return new ExportedPackage[0];
}
@Override
public ExportedPackage getExportedPackage(String s) {
return null;
}
@Override
public void refreshPackages(Bundle[] bundles) {
}
@Override
public boolean resolveBundles(Bundle[] bundles) {
return false;
}
@Override
public RequiredBundle[] getRequiredBundles(String s) {
return new RequiredBundle[0];
}
@Override
public Bundle[] getBundles(String s, String s1) {
return new Bundle[0];
}
@Override
public Bundle[] getFragments(Bundle bundle) {
return new Bundle[0];
}
@Override
public Bundle[] getHosts(Bundle bundle) {
return new Bundle[0];
}
@Override
public Bundle getBundle(Class aClass) {
return null;
}
@Override
public int getBundleType(Bundle bundle) {
return 0;
}
};
bundleContext.registerService(PackageAdmin.class.getName(), packageAdmin, null);
builder = new JettyModuleBuilder(defaultEnvironment,
new Integer(1800),
jettyContainerObjectName,
new WebAppInfo(),
null,