static ApplicationReindexing withOnlyCurrentData(ApplicationReindexing reindexing, Application application) {
        return withOnlyCurrentData(reindexing, application.getModel().documentTypesByCluster());
    }
@Test
    public void testGarbageRemoval() {
        ApplicationReindexing reindexing = ApplicationReindexing.empty()
                                                                .withPending("one", "a", 10)
                                                                .withPending("two", "b", 20)
                                                                .withReady("one", "a", Instant.ofEpochMilli(3), SPEED, CAUSE)
                                                                .withReady("two", "b", Instant.ofEpochMilli(2), SPEED, CAUSE)
                                                                .withReady("two", "c", Instant.ofEpochMilli(3), SPEED, CAUSE);

        assertEquals(reindexing,
                     withOnlyCurrentData(reindexing, Map.of("one", List.of("a", "b", "c", "d"),
                                                            "two", List.of("b", "c"),
                                                            "three", List.of("a", "b"))));

        assertEquals(reindexing,
                     withOnlyCurrentData(reindexing, Map.of("one", List.of("a"),
                                                            "two", List.of("b", "c"))));

        assertEquals(ApplicationReindexing.empty()
                                          .withPending("two", "b", 20).withReady("two", "b", Instant.ofEpochMilli(2), SPEED, CAUSE),
                     withOnlyCurrentData(reindexing, Map.of("two", List.of("a", "b"))));

        assertEquals(ApplicationReindexing.empty()
                                          .withReady("one", "a", Instant.EPOCH, SPEED, CAUSE)
                                          .without("one", "a")
                                          .withReady("two", "c", Instant.ofEpochMilli(3), SPEED, CAUSE),
                     withOnlyCurrentData(reindexing, Map.of("one", List.of("c"),
                                                            "two", List.of("c"))));
    }