private void assertScalarsFromCompositeDataInTable() {

		Listing listing = program.getListing();
		DataIterator compositeData = listing.getCompositeData(true);
		Data composite = compositeData.next();
		assertTrue("Expected array; found: " + composite, composite.getDataType() instanceof Array);

		//@formatter:off
		List<ScalarRowObject> data = getTableData();
		List<Address> addresses =
			data.stream()
				.map(rowObject -> rowObject.getAddress())
				.collect(Collectors.toList())
				;
		//@formatter:on

		int n = composite.getNumComponents();
		for (int i = 0; i < n; i++) {
			Data child = composite.getComponent(i);
			Address a = child.getAddress();
			assertTrue(addresses.contains(a));
		}
	}
Function for the case when the min is greater than the max.
In this case, the program expects for there to be 0 entries in the scalar table.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/scalartable/ScalarSearchTest.java