@Test
	public void testDeleteFunctionFromListing() {
		Set<Function> functions = Set.of(foo, bar);
		provider = compareFunctions(functions);

		assertEquals(provider.getModel().getFunctions(LEFT).size(), 2);
		assertTrue(provider.getModel().getFunctions(LEFT).contains(foo));
		assertTrue(provider.getModel().getFunctions(LEFT).contains(bar));

		Address address = program1.getAddressFactory().getAddress("10018cf");
		ProgramLocation loc = new ProgramLocation(program1, address);
		cbPlugin.goTo(loc);
		DockingActionIf deleteAction = getAction(functionPlugin, "Delete Function");
		performAction(deleteAction, cbPlugin.getProvider().getActionContext(null), true);
		waitForSwing();

		assertEquals(provider.getModel().getFunctions(LEFT).size(), 1);
		assertTrue(provider.getModel().getFunctions(LEFT).contains(bar));
	}
Verifies that if we delete a function from the listing that is currently
being shown in a comparison provider, it will be removed from that
comparison provider
Ghidra/Features/CodeCompare/src/main/test/ghidra/features/codecompare/plugin/CompareFunctionsProviderTest.java