@Test
public void test_filter_queue_removes_duplicates() throws Exception {

    docCollectionFactory.createQueue(propertyProvider, "test:queue").put(get("/path/to/doc"));
    docCollectionFactory.createQueue(propertyProvider, "test:queue").put(get("/path/to/doc"));
    docCollectionFactory.createQueue(propertyProvider, "test:queue").add(POISON);
    assertThat(new DeduplicateTask(docCollectionFactory, propertyProvider, local(), "test:queue").call()).isEqualTo(1);
    assertThat(docCollectionFactory.createQueue(propertyProvider, "test:queue:deduplicate").size()).isEqualTo(2); // with POISON
}