@Test
public void testRemove() {

   PriorityCollection<TestPriorityAware> set = new PriorityCollection<>(CopyOnWriteArraySet::new);
   assertTrue(set.isEmpty());
   assertTrue(set.add(new TestPriorityAware(1)));
   assertFalse(set.isEmpty());
   assertFalse(set.remove(new TestPriorityAware(0)));
   assertFalse(set.isEmpty());
   assertTrue(set.remove(new TestPriorityAware(1)));
   assertTrue(set.isEmpty());
}