@Test
void whenOnlyListeningForExtendedStates_thenRemoveOnlyReceivesDeletedExtendedStates() {

    (new FilteringStateChangeListenable<>(cache, this::asExtended)).registerStateRemovedListener(s -> {
        result = true;
        resultOld = s;
    });
    cache.add(state1);
    assertFalse(result);
    cache.add(extended1);
    assertFalse(result);
    // Check that add doesn't fire on updates
    cache.update(state1, state1Updated);
    assertFalse(result);
    cache.update(extended1, extended1Updated);
    assertFalse(result);
    // Check that add doesn't fire on removals
    cache.delete(state1Updated.getId());
    assertFalse(result);
    cache.delete(extended1Updated.getId());
    assertTrue(result);
    assertEquals(extended1Updated, resultOld);
}