private void assertCloseEnough(TreePath expected, TreePath actual) {

		if (actual == null) {
			fail("No actual TreePath found");
		}

		if (expected.equals(actual)) {
			return; // good
		}

		// Unusual Code: we add some 'fudge' to the viewable tree rows (1 in the top and 
		//               bottom direction).  So, the actual path visible may be off by that 
		//               much.
		int fudge = 2; // 1 in both directions
		int expectedRow = gTree.getRowForPath(expected);
		if (rowNumberIsWithin(expected, actual, fudge)) {
			return; // good enough
		}

		int actualRow = gTree.getRowForPath(actual);
		fail("Tree paths do not match - expected row " + expectedRow + "; actual row " + actualRow);
	}
Verifies the actual is within one of the expected
Ghidra/Framework/Docking/src/test.slow/java/docking/widgets/tree/GTreeTest.java