@Test
	public void testClear() {
		List<Pair<IntRect, String>> points = generatePoints(rect(1, 12, 1, 12));
		try (Transaction tx = obj.openTransaction("AddPoints")) {
			for (Entry<IntRect, String> ent : points) {
				obj.map.put(ent.getKey(), ent.getValue());
			}
		}

		try (Transaction tx = obj.openTransaction("RemovePoints")) {
			obj.map.reduce(IntRectQuery.enclosed(rect(6, 6, 6, 6))).clear();
			obj.tree.checkIntegrity();
			assertEquals(143, obj.map.size());
			assertFalse(obj.map.values().contains("Point(6,6)"));

			obj.map.reduce(IntRectQuery.enclosed(rect(1, 6, 1, 12))).clear();
			obj.tree.checkIntegrity();
			assertEquals(72, obj.map.size());
			Map<IntRect, String> expected = new HashMap<>();
			Map<IntRect, String> actual = new HashMap<>();
			points.stream()
					.filter(e -> e.getKey().enclosedBy(rect(7, 12, 1, 12)))
					.forEach(e -> expected.put(e.getKey(), e.getValue()));
			obj.map.entries().stream().forEach(e -> actual.put(e.getKey(), e.getValue()));
			assertEquals(expected, actual);

			obj.map.clear();
			obj.tree.checkIntegrity();
			assertTrue(obj.map.isEmpty());
		}
	}
@throws InterruptedException maybe when Thread.sleep is uncommented
Ghidra/Debug/ProposedUtils/src/test/java/ghidra/util/database/spatial/RStarTreeMapTest.java