@Test
public void observe1Table() throws Exception {

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