test_class.declarator: factory
test_class.modifier: private @NonNullByDefault({})
test_class.original_string: private @NonNullByDefault({}) EphemerisModuleHandlerFactory factory;
test_class.type: EphemerisModuleHandlerFactory
test_class.var_name: factory
test_class.declarator: moduleMock
test_class.modifier: private @NonNullByDefault({})
test_class.original_string: private @NonNullByDefault({}) Module moduleMock;
test_class.type: Module
test_class.var_name: moduleMock
test_class.file: bundles/org.openhab.core.automation/src/test/java/org/openhab/core/automation/internal/module/factory/EphemerisModuleHandlerFactoryTest.java
test_class.identifier: EphemerisModuleHandlerFactoryTest
test_case.body: @Test
      public void testFactoryCreatesModuleHandlerForDaysetCondition() {
          when(moduleMock.getTypeUID()).thenReturn(EphemerisConditionHandler.DAYSET_MODULE_TYPE_ID);
  
          when(moduleMock.getConfiguration()).thenReturn(new Configuration(Map.of("dayset", "school")));
          ModuleHandler handler = factory.internalCreate(moduleMock, "My second rule");
          assertThat(handler, is(notNullValue()));
          assertThat(handler, instanceOf(EphemerisConditionHandler.class));
      }
test_case.class_method_signature: EphemerisModuleHandlerFactoryTest.testFactoryCreatesModuleHandlerForDaysetCondition()
test_case.full_signature: @Test public void testFactoryCreatesModuleHandlerForDaysetCondition()
test_case.identifier: testFactoryCreatesModuleHandlerForDaysetCondition
test_case.invocations: thenReturn when getTypeUID thenReturn when getConfiguration of internalCreate assertThat is notNullValue assertThat instanceOf
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testFactoryCreatesModuleHandlerForDaysetCondition()
focal_class.declarator: logger = LoggerFactory.getLogger(EphemerisModuleHandlerFactory.class)
focal_class.modifier: private final
focal_class.original_string: private final Logger logger = LoggerFactory.getLogger(EphemerisModuleHandlerFactory.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: TYPES = List.of(EphemerisConditionHandler.HOLIDAY_MODULE_TYPE_ID,
              EphemerisConditionHandler.WEEKEND_MODULE_TYPE_ID, EphemerisConditionHandler.WEEKDAY_MODULE_TYPE_ID,
              EphemerisConditionHandler.DAYSET_MODULE_TYPE_ID)
focal_class.modifier: private static final
focal_class.original_string: private static final Collection<String> TYPES = List.of(EphemerisConditionHandler.HOLIDAY_MODULE_TYPE_ID,
              EphemerisConditionHandler.WEEKEND_MODULE_TYPE_ID, EphemerisConditionHandler.WEEKDAY_MODULE_TYPE_ID,
              EphemerisConditionHandler.DAYSET_MODULE_TYPE_ID);
focal_class.type: Collection<String>
focal_class.var_name: TYPES
focal_class.declarator: ephemerisManager
focal_class.modifier: private final
focal_class.original_string: private final EphemerisManager ephemerisManager;
focal_class.type: EphemerisManager
focal_class.var_name: ephemerisManager
focal_class.file: bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/internal/module/factory/EphemerisModuleHandlerFactory.java
focal_class.identifier: EphemerisModuleHandlerFactory
focal_class.interfaces: implements ModuleHandlerFactory
focal_class.class_method_signature: EphemerisModuleHandlerFactory.EphemerisModuleHandlerFactory(final @Reference EphemerisManager ephemerisManager)
focal_class.full_signature: @Activate public  EphemerisModuleHandlerFactory(final @Reference EphemerisManager ephemerisManager)
focal_class.identifier: EphemerisModuleHandlerFactory
focal_class.modifiers: @Activate public
focal_class.parameters: (final @Reference EphemerisManager ephemerisManager)
focal_class.signature:  EphemerisModuleHandlerFactory(final @Reference EphemerisManager ephemerisManager)
focal_class.class_method_signature: EphemerisModuleHandlerFactory.deactivate()
focal_class.full_signature: @Override @Deactivate protected void deactivate()
focal_class.identifier: deactivate
focal_class.modifiers: @Override @Deactivate protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void deactivate()
focal_class.class_method_signature: EphemerisModuleHandlerFactory.getTypes()
focal_class.full_signature: @Override public Collection<String> getTypes()
focal_class.identifier: getTypes
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Collection<String>
focal_class.signature: Collection<String> getTypes()
focal_class.class_method_signature: EphemerisModuleHandlerFactory.internalCreate(final Module module, final String ruleUID)
focal_class.full_signature: @Override protected @Nullable ModuleHandler internalCreate(final Module module, final String ruleUID)
focal_class.identifier: internalCreate
focal_class.modifiers: @Override protected @Nullable
focal_class.parameters: (final Module module, final String ruleUID)
focal_class.return: ModuleHandler
focal_class.signature: ModuleHandler internalCreate(final Module module, final String ruleUID)
focal_class.superclass: extends BaseModuleHandlerFactory
focal_method.body: @Override
      protected @Nullable ModuleHandler internalCreate(final Module module, final String ruleUID) {
          final String moduleTypeUID = module.getTypeUID();
          logger.trace("create {} -> {} : {}", module.getId(), moduleTypeUID, ruleUID);
  
          if (module instanceof Condition) {
              switch (moduleTypeUID) {
                  case EphemerisConditionHandler.HOLIDAY_MODULE_TYPE_ID:
                  case EphemerisConditionHandler.WEEKEND_MODULE_TYPE_ID:
                  case EphemerisConditionHandler.WEEKDAY_MODULE_TYPE_ID:
                  case EphemerisConditionHandler.DAYSET_MODULE_TYPE_ID:
                      return new EphemerisConditionHandler((Condition) module, ephemerisManager);
              }
          }
  
          logger.error("The ModuleHandler is not supported: {}", moduleTypeUID);
          return null;
      }
focal_method.class_method_signature: EphemerisModuleHandlerFactory.internalCreate(final Module module, final String ruleUID)
focal_method.full_signature: @Override protected @Nullable ModuleHandler internalCreate(final Module module, final String ruleUID)
focal_method.identifier: internalCreate
focal_method.invocations: getTypeUID trace getId error
focal_method.modifiers: @Override protected @Nullable
focal_method.parameters: (final Module module, final String ruleUID)
focal_method.return: ModuleHandler
focal_method.signature: ModuleHandler internalCreate(final Module module, final String ruleUID)