public List<InterpreterResultMessage> message() {
    return msg;
  }
@Test
  void testComplexMagicType() {
    InterpreterResult result = null;

    result = new InterpreterResult(InterpreterResult.Code.SUCCESS,
        "some text before %table col1\tcol2\naaa\t123\n");
    assertEquals(InterpreterResult.Type.TEXT, result.message().get(0).getType(),
        "some text before magic return magic");
    result = new InterpreterResult(InterpreterResult.Code.SUCCESS,
        "some text before\n%table col1\tcol2\naaa\t123\n");
    assertEquals(InterpreterResult.Type.TEXT, result.message().get(0).getType(),
        "some text before magic return magic");
    assertEquals(InterpreterResult.Type.TABLE, result.message().get(1).getType(),
        "some text before magic return magic");
    result = new InterpreterResult(InterpreterResult.Code.SUCCESS,
        "%html  <h3> This is a hack </h3> %table\n col1\tcol2\naaa\t123\n");
    assertEquals(InterpreterResult.Type.HTML, result.message().get(0).getType(),
        "magic A before magic B return magic A");
    result = new InterpreterResult(InterpreterResult.Code.SUCCESS,
        "some text before magic word %table col1\tcol2\naaa\t123\n %html  " +
            "<h3> This is a hack </h3>");
    assertEquals(InterpreterResult.Type.TEXT, result.message().get(0).getType(),
        "text & magic A before magic B return magic A");
    result = new InterpreterResult(InterpreterResult.Code.SUCCESS,
        "%table col1\tcol2\naaa\t123\n %html  <h3> This is a hack </h3> %table col1\naaa\n123\n");
    assertEquals(InterpreterResult.Type.TABLE, result.message().get(0).getType(),
        "magic A, magic B, magic a' return magic A");
  }