@Test
	public void testGetListeners() {
		WeakSet<String> weakSet = WeakDataStructureFactory.createCopyOnWriteWeakSet();

		String[] values = { "one", "two", "three" };

		// test add
		for (String value : values) {
			weakSet.add(value);
		}

		assertTrue("The weak set does not contain the correct number of " +
			"elements after calling add().", (values.length == weakSet.size()));

		Iterator<String> iterator = weakSet.iterator();

		// check the array against our values
		int elementCount = 0;
		List<String> valuesList = new ArrayList<String>(Arrays.asList(values));
		for (; iterator.hasNext(); elementCount++) {
			assertTrue("An element returned from the weak set was not " + "passed to the set.",
				valuesList.contains(iterator.next()));
		}

		assertTrue("The weak set returned a values array that is not the " +
			"size as the number of values passed in.", (elementCount == values.length));
	}
Tests the {@link WeakSet} class.


@since  Tracker Id 522
Ghidra/Framework/Generic/src/test/java/ghidra/util/datastruct/WeakSetTest.java