private void addAndRemoveStatusItems() {
		final JLabel label1 = new GDLabel("Test Label 1");
		final JLabel label2 = new GDLabel("Test Label 2");

		// normal add/remove operations
		runSwing(() -> {
			statusBar.addStatusItem(label1, true, true);
			statusBar.addStatusItem(label2, true, true);
		});

		runSwing(() -> {
			statusBar.removeStatusItem(label1);
			statusBar.removeStatusItem(label2);
		});

		// method call variations
		runSwing(() -> {
			statusBar.addStatusItem(label1, false, true);
			statusBar.addStatusItem(label2, true, false);
		});

		runSwing(() -> {
			statusBar.removeStatusItem(label1);
			statusBar.removeStatusItem(label2);
		});

		// repeat adding
		runSwing(() -> {
			statusBar.addStatusItem(label1, true, true);
			statusBar.addStatusItem(label1, true, true);
		});

		// removing non-existent elements        
		runSwing(() -> statusBar.removeStatusItem(label2));

		runSwing(() -> {
			try {
				statusBar.removeStatusItem(new GLabel("Test Label 3"));

				Assert.fail("Did not receive an expected NullPointerException.");
			}
			catch (NullPointerException npe) {
				// expected, caused by a null parent
			}
		});
	}
Tests the {@link StatusBar} class.


@since  Tracker Id 323
Ghidra/Framework/Docking/src/test.slow/java/docking/StatusBarTest.java