@Test
public void mirroredSet() throws Exception {

    ObservableSet<String> source = FXCollections.observableSet();
    source.add("alpha");
    source.add("beta");
    ObservableSet<String> dest = ObservableMirrors.mirrorSet(source, gate);
    assertEquals(0, gate.getTaskQueueSize());
    assertEquals(2, dest.size());
    source.add("delta");
    assertEquals(1, gate.getTaskQueueSize());
    assertEquals(2, dest.size());
    gate.waitAndRun();
    assertEquals(0, gate.getTaskQueueSize());
    assertEquals(3, dest.size());
    source.removeAll(ImmutableList.of("alpha", "beta"));
    assertEquals(2, gate.getTaskQueueSize());
    gate.waitAndRun();
    gate.waitAndRun();
    assertEquals(1, dest.size());
    assertTrue(dest.contains("delta"));
}