@Test
public void testFactoryCreatesModuleHandlerForWeekdayCondition() {

    when(moduleMock.getTypeUID()).thenReturn(EphemerisConditionHandler.WEEKDAY_MODULE_TYPE_ID);
    when(moduleMock.getConfiguration()).thenReturn(new Configuration());
    ModuleHandler handler = factory.internalCreate(moduleMock, "My first rule");
    assertThat(handler, is(notNullValue()));
    assertThat(handler, instanceOf(EphemerisConditionHandler.class));
    when(moduleMock.getConfiguration()).thenReturn(new Configuration(Map.of("offset", 5)));
    handler = factory.internalCreate(moduleMock, "My second rule");
    assertThat(handler, is(notNullValue()));
    assertThat(handler, instanceOf(EphemerisConditionHandler.class));
}