@Test
public void TestClearWhileNotifying() {

    final ObserverList<String> list = concurrentListOf();
    Observer<String> a = Callback("a");
    Observer<String> c = Callback("c");
    Observer<String> b = Callback("b", new Observer<String>() {
        @Override
        public void onChanged(String value) {
            list.clear();
        }
    });
    list.add(a);
    list.add(b);
    list.add(c);
    list.notifyObservers("1");
    assertResults("a:1", "b:1");
    assertEquals(0, list.size());
    assertTrue(list.isEmpty());
    list.notifyObservers("2");
    assertResults();
}