@Before
	public void setUp() throws Exception {

		String name = super.testName.getMethodName();
		if (name.endsWith("_Notepad")) {
			program = createNotepadProgram();
		}
		else {
			program = createDefaultProgram();
		}

		env = new TestEnv();
		setErrorGUIEnabled(false);
		tool = env.launchDefaultTool(program);

		waitForBusyTool(tool);
		waitForSwing();

		// get actions for each service provider
		clipboardPlugin = getPlugin(tool, ClipboardPlugin.class);
		actionMap = getActionMap();

		// Showing decompiler establishes clipboard provider for it
		initializeComponentProviders();

		initializeClipboardProviders();

		clearClipboardContents();
	}
Note: This test is sensitive to focus. So, don't click any windows while this test is running.
Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/app/plugin/core/clipboard/ClipboardPluginTest.java