@Test
public void testAlwaysAutoApproveInboxEntries() {

    // Before setting the always auto approve property, existing inbox results are not approved
    inbox.add(DiscoveryResultBuilder.create(THING_UID).build());
    verify(thingRegistry, never()).add(argThat(thing -> THING_UID.equals(thing.getUID())));
    // After setting the always auto approve property, all existing inbox results are approved.
    Map<String, Object> configProperties = new HashMap<>();
    configProperties.put(AutomaticInboxProcessor.ALWAYS_AUTO_APPROVE_CONFIG_PROPERTY, true);
    automaticInboxProcessor.activate(configProperties);
    verify(thingRegistry, times(1)).add(argThat(thing -> THING_UID.equals(thing.getUID())));
    // Newly added inbox results are also approved.
    inbox.add(DiscoveryResultBuilder.create(THING_UID2).build());
    verify(thingRegistry, times(1)).add(argThat(thing -> THING_UID2.equals(thing.getUID())));
}