@Test
public void observe2Tables() throws Exception {

    LatchObserver observer = new LatchObserver(1, "A", "B");
    mTracker.addObserver(observer);
    setVersions(1, 0, 2, 1);
    refreshSync();
    assertThat(observer.await(), is(true));
    assertThat(observer.getInvalidatedTables().size(), is(2));
    assertThat(observer.getInvalidatedTables(), hasItems("A", "B"));
    setVersions(3, 1);
    observer.reset(1);
    refreshSync();
    assertThat(observer.await(), is(true));
    assertThat(observer.getInvalidatedTables().size(), is(1));
    assertThat(observer.getInvalidatedTables(), hasItem("B"));
    setVersions(4, 0);
    observer.reset(1);
    refreshSync();
    assertThat(observer.await(), is(true));
    assertThat(observer.getInvalidatedTables().size(), is(1));
    assertThat(observer.getInvalidatedTables(), hasItem("A"));
    observer.reset(1);
    refreshSync();
    assertThat(observer.await(), is(false));
}