Bug 293357 [context] Switch annotation processing to JSR 330
tests/org.eclipse.e4.core.commands.tests/src/org/eclipse/e4/core/commands/tests/HandlerTest.java
private IEclipseContext workbenchContext;
	@Override
	protected void setUp() throws Exception {
		workbenchContext = createWorkbenchContext(TestActivator.getDefault()
				.getGlobalContext());
		defineCommands(workbenchContext);
	}
	@Override
	protected void tearDown() throws Exception {
		if (workbenchContext instanceof IDisposable) {
			((IDisposable) workbenchContext).dispose();
		}
		workbenchContext = null;
	}
	private void defineCommands(IEclipseContext context) {
		ECommandService cs = (ECommandService) workbenchContext
				.get(ECommandService.class.getName());
		Category category = cs.defineCategory(TEST_CAT1, "CAT1", null);
		cs.defineCommand(TEST_ID1, "ID1", null, category, null);
		cs.defineCommand(TEST_ID2, "ID2", null, category, null);
	}
	private IEclipseContext createWorkbenchContext(IEclipseContext globalContext) {
		IEclipseContext wb = TestUtil.createContext(globalContext,
				"workbenchContext");
		ContextUtil.commandSetup(wb);
		ContextUtil.handlerSetup(wb);
		return wb;
	}
}