@Test
public void testInsertIOConfiguration() {

    String assembly =
            "init:       ldc 10\najw         -11\n";
    List<Instruction> instructions = Assembler.parseAssembly(assembly);
    AssemblerConfig config = getSampleConfig();
    List<Instruction> configuredInstructions = Assembler.insertIOConfiguration(instructions, config);
    checkInstructionEquality(
            new Instruction(InstructionType.INSTRUCTION, "init", null, null, null, null, null, 1),
            configuredInstructions.get(0));
    checkInstructionEquality(
            new Instruction(InstructionType.INSTRUCTION, null, Assembler.opcodes.get("ldc"), 70L, null, null, null, 1),
            configuredInstructions.get(1));
    checkInstructionEquality(
            new Instruction(InstructionType.INSTRUCTION, null, Assembler.opcodes.get("ldc"), 0L, null, null, null, 1),
            configuredInstructions.get(2));
    checkInstructionEquality(
            new Instruction(InstructionType.INSTRUCTION, null, Assembler.opcodes.get("confio"), null, null, null, null, 1),
            configuredInstructions.get(3));
    checkInstructionEquality(
            new Instruction(InstructionType.INSTRUCTION, "postconfig", Assembler.opcodes.get("ldc"), 10L, null, null, null, 1),
            configuredInstructions.get(4));
    checkInstructionEquality(
            new Instruction(InstructionType.INSTRUCTION, null, Assembler.opcodes.get("ajw"), -11L, null, null, null, 2),
            configuredInstructions.get(5));
}