test_class.declarator: underTest
test_class.modifier: private
test_class.original_string: private LiveCommandFactory underTest;
test_class.type: LiveCommandFactory
test_class.var_name: underTest
test_class.file: signals/commands/live/src/test/java/org/eclipse/ditto/signals/commands/live/LiveCommandFactoryTest.java
test_class.identifier: LiveCommandFactoryTest
test_case.body: @Test
      public void tryToGetLiveCommandForCommandWithUnknownType() {
          final Command<?> commandMock = Mockito.mock(Command.class);
          Mockito.when(commandMock.getType()).thenReturn("Harambe");
  
          assertThatExceptionOfType(IllegalArgumentException.class)
                  .isThrownBy(() -> underTest.getLiveCommand(commandMock))
                  .withMessage("No mapping strategy for command <%s> available! The command type <%s> is unknown!",
                          commandMock, commandMock.getType())
                  .withNoCause();
      }
test_case.class_method_signature: LiveCommandFactoryTest.tryToGetLiveCommandForCommandWithUnknownType()
test_case.full_signature: @Test public void tryToGetLiveCommandForCommandWithUnknownType()
test_case.identifier: tryToGetLiveCommandForCommandWithUnknownType
test_case.invocations: mock thenReturn when getType withNoCause withMessage isThrownBy assertThatExceptionOfType getLiveCommand getType
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void tryToGetLiveCommandForCommandWithUnknownType()
focal_class.declarator: STRATEGIES_NUMBER = 26
focal_class.modifier: private static final
focal_class.original_string: private static final int STRATEGIES_NUMBER = 26;
focal_class.type: int
focal_class.var_name: STRATEGIES_NUMBER
focal_class.declarator: INSTANCE = new LiveCommandFactory()
focal_class.modifier: private static final
focal_class.original_string: private static final LiveCommandFactory INSTANCE = new LiveCommandFactory();
focal_class.type: LiveCommandFactory
focal_class.var_name: INSTANCE
focal_class.declarator: mappingStrategies
focal_class.modifier: private final
focal_class.original_string: private final Map<String, Function<Command, LiveCommand>> mappingStrategies;
focal_class.type: Map<String, Function<Command, LiveCommand>>
focal_class.var_name: mappingStrategies
focal_class.file: signals/commands/live/src/main/java/org/eclipse/ditto/signals/commands/live/LiveCommandFactory.java
focal_class.identifier: LiveCommandFactory
focal_class.class_method_signature: LiveCommandFactory.LiveCommandFactory()
focal_class.full_signature: private  LiveCommandFactory()
focal_class.identifier: LiveCommandFactory
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  LiveCommandFactory()
focal_class.class_method_signature: LiveCommandFactory.initMappingStrategies()
focal_class.full_signature: private static Map<String, Function<Command, LiveCommand>> initMappingStrategies()
focal_class.identifier: initMappingStrategies
focal_class.modifiers: private static
focal_class.parameters: ()
focal_class.return: Map<String, Function<Command, LiveCommand>>
focal_class.signature: Map<String, Function<Command, LiveCommand>> initMappingStrategies()
focal_class.class_method_signature: LiveCommandFactory.getInstance()
focal_class.full_signature: @Nonnull public static LiveCommandFactory getInstance()
focal_class.identifier: getInstance
focal_class.modifiers: @Nonnull public static
focal_class.parameters: ()
focal_class.return: LiveCommandFactory
focal_class.signature: LiveCommandFactory getInstance()
focal_class.class_method_signature: LiveCommandFactory.getLiveCommand(@Nonnull final Command<?> command)
focal_class.full_signature: @Nonnull public LiveCommand getLiveCommand(@Nonnull final Command<?> command)
focal_class.identifier: getLiveCommand
focal_class.modifiers: @Nonnull public
focal_class.parameters: (@Nonnull final Command<?> command)
focal_class.return: LiveCommand
focal_class.signature: LiveCommand getLiveCommand(@Nonnull final Command<?> command)
focal_method.body: @Nonnull
      public LiveCommand getLiveCommand(@Nonnull final Command<?> command) {
          checkNotNull(command, "command");
  
          final String commandType = command.getType();
          final Function<Command, LiveCommand> commandToLiveCommand = mappingStrategies.get(commandType);
          if (null == commandToLiveCommand) {
              final String msgTemplate = "No mapping strategy for command <{0}> available!"
                      + " The command type <{1}> is unknown!";
              throw new IllegalArgumentException(MessageFormat.format(msgTemplate, command, commandType));
          }
          return commandToLiveCommand.apply(command);
      }
focal_method.class_method_signature: LiveCommandFactory.getLiveCommand(@Nonnull final Command<?> command)
focal_method.full_signature: @Nonnull public LiveCommand getLiveCommand(@Nonnull final Command<?> command)
focal_method.identifier: getLiveCommand
focal_method.invocations: checkNotNull getType get format apply
focal_method.modifiers: @Nonnull public
focal_method.parameters: (@Nonnull final Command<?> command)
focal_method.return: LiveCommand
focal_method.signature: LiveCommand getLiveCommand(@Nonnull final Command<?> command)