@Test
void whenOnlyListeningForExtendedStates_thenStreamOnlyReturnsThemInOrder() {

    cache.add(state1);
    cache.add(extended1);
    cache.add(state2);
    cache.add(extended2);
    ImmutableList<ExtendedTestState> states = (new FilteringStateChangeListenable<>(cache, this::asExtended)).stream().collect(ImmutableList.toImmutableList());
    assertEquals(2, states.size());
    assertEquals(extended1, states.get(0));
    assertEquals(extended2, states.get(1));
}