@Test
public void assertIsHandlerInitializedWorksCorrectlyForAThingHandler() {

    when(thingHandler.getThing()).thenReturn(thing);
    thing.setStatusInfo(create(ThingStatus.UNINITIALIZED).build());
    assertThat(isHandlerInitialized(thingHandler), is(false));
    thing.setStatusInfo(create(ThingStatus.INITIALIZING).build());
    assertThat(isHandlerInitialized(thingHandler), is(false));
    thing.setStatusInfo(create(ThingStatus.REMOVING).build());
    assertThat(isHandlerInitialized(thingHandler), is(false));
    thing.setStatusInfo(create(ThingStatus.REMOVED).build());
    assertThat(isHandlerInitialized(thingHandler), is(false));
    thing.setStatusInfo(create(ThingStatus.UNKNOWN).build());
    assertThat(isHandlerInitialized(thingHandler), is(true));
    thing.setStatusInfo(create(ThingStatus.ONLINE).build());
    assertThat(isHandlerInitialized(thingHandler), is(true));
    thing.setStatusInfo(create(ThingStatus.OFFLINE).build());
    assertThat(isHandlerInitialized(thingHandler), is(true));
}