@Test
public void testAutomaticDiscoveryResultApprovalIfInboxEntriesAddedAfterApprovalPredicatesAreAdded() {

    automaticInboxProcessor.addInboxAutoApprovePredicate(
            discoveryResult -> THING_TYPE_UID.equals(discoveryResult.getThingTypeUID()));
    // The following discovery result is automatically approved, as it has matching thing type UID
    inbox.add(DiscoveryResultBuilder.create(THING_UID).build());
    verify(thingRegistry, times(1)).add(argThat(thing -> THING_UID.equals(thing.getUID())));
    // The following discovery result is not automatically approved, as it does not have matching thing type UID
    inbox.add(DiscoveryResultBuilder.create(THING_UID3).build());
    verify(thingRegistry, never()).add(argThat(thing -> THING_UID3.equals(thing.getUID())));
}