@Test
public void testThingWithConfigIsBeingRemoved() {

    inbox.add(DiscoveryResultBuilder.create(THING_UID2).withProperty(OTHER_KEY, OTHER_VALUE)
            .withRepresentationProperty(OTHER_KEY).build());
    inbox.setFlag(THING_UID2, DiscoveryResultFlag.IGNORED);
    List<DiscoveryResult> results = inbox.stream().filter(withFlag(DiscoveryResultFlag.IGNORED))
            .collect(Collectors.toList());
    assertThat(results.size(), is(1));
    assertThat(results.get(0).getThingUID(), is(equalTo(THING_UID2)));
    automaticInboxProcessor.removed(thing2);
    results = inbox.getAll();
    assertThat(results.size(), is(0));
}