public static int[] convertToByteCode(String instructions) {
    if (instructions == null || instructions.trim().length() == 0) {
      return new int[0];
    }

    var splitedInstructions = instructions.trim().split(" ");
    var bytecode = new int[splitedInstructions.length];
    for (var i = 0; i < splitedInstructions.length; i++) {
      if (isValidInstruction(splitedInstructions[i])) {
        bytecode[i] = Instruction.valueOf(splitedInstructions[i]).getIntValue();
      } else if (isValidInt(splitedInstructions[i])) {
        bytecode[i] = Integer.parseInt(splitedInstructions[i]);
      } else {
        var errorMessage = "Invalid instruction or number: " + splitedInstructions[i];
        throw new IllegalArgumentException(errorMessage);
      }
    }

    return bytecode;
  }
@Test
  void testEmptyInstruction() {
    var instruction = "";

    var bytecode = InstructionConverterUtil.convertToByteCode(instruction);

    Assertions.assertEquals(0, bytecode.length);
  }