@Test public void testToArrayWithParam() { addStringsToCollection(bag); Set<String> expected = new HashSet<>(); addStringsToCollection(expected); Assert.assertEquals(expected.toArray(), bag.toArray(new Object[bag.uniqueSize()])); }
@Test public void testUniqueSize() { addStringsToCollection(bag); List<String> expected = new ArrayList<>(); addStringsToCollection(expected); Assert.assertEquals(expected.size(), bag.uniqueSize()); }