@Test
	public void testGetSelectedDatatypesFromService() {
		DataTypeManagerService dataTypeManagerService =
			tool.getService(DataTypeManagerService.class);

		assertEquals(0, dataTypeManagerService.getSelectedDatatypes().size());

		CategoryPath path = new CategoryPath("/MISC");
		DataType dt1 = program.getDataTypeManager().getDataType(path, "ArrayStruct");
		DataType dt2 = program.getDataTypeManager().getDataType(path, "ArrayUnion");

		selectDataTypes(dt1, dt2);

		List<DataType> selectedDatatypes = dataTypeManagerService.getSelectedDatatypes();
		assertEquals(2, selectedDatatypes.size());
		assertTrue(selectedDatatypes.contains(dt1));
		assertTrue(selectedDatatypes.contains(dt2));
	}
Tests for managing categories through the data manager plugin and tests for
actions being enabled when a node is selected.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/datamgr/DataTypeManagerPluginTest.java