public void testLoadTest() throws Exception {
BundleContext ctx = new MockBundleContext();
MockControl servCtrl = MockControl.createControl(TestRunnerService.class);
TestRunnerService runner = (TestRunnerService) servCtrl.getMock();
try {
activator.executeTest();
fail("should have thrown exception");
}
catch (RuntimeException ex) {
// expected
}
setActivatorField("service", runner);
runner.runTest(null);
servCtrl.setMatcher(MockControl.ALWAYS_MATCHER);
servCtrl.replay();
setActivatorField("context", ctx);
OsgiTestInfoHolder.INSTANCE.setTestClassName(TestExample.class.getName());