anchor.diff:      Ret = compile([SAY, PLAY], "0", ascii),
       io:format(Ret),
       compile([SAY, PLAY]).
  +
  +testing6() -> encode([#dial{action="/do_stuff", body="1234833"}]).
  
positive.code:                  lists:flatten(encode([#sms{text="Hello!"}]))),
                ?assertEqual(
                   ?XML("<Sms action=\"default/sms\">Hello!</Sms>"),
                   lists:flatten(encode([#sms{text="Hello!", action="default/sms"}])))
        end},
       {"dial twiml",
        fun() ->
                ?assertEqual(
                   ?XML("<Dial></Dial>"),
                   lists:flatten(encode([#dial{}]))),
                ?assertEqual(
                   ?XML("<Dial action=\"/do_stuff\">1234833</Dial>"),
                   lists:flatten(encode([#dial{action="/do_stuff", body="1234833"}]))),
                ?assertEqual(
                   ?XML("<Dial action=\"/do_stuff\"><Number>1234833</Number></Dial>"),
                   lists:flatten(encode([#dial{action="/do_stuff", body=#number{number="1234833"}}]))),
                ?assertEqual(
                   ?XML("<Dial action=\"/do_stuff\"><Number sendDigits=\"9528\">1234833</Number></Dial>"),
                   lists:flatten(encode([#dial{action="/do_stuff",
                                               body=#number{send_digits="9528", number="1234833"}}])))
        end},
       {"composite twiml",
        fun() ->
                ?assertEqual(
                   ?XML("<Say>Hello! This is a voice message</Say><Say>This is another message</Say><Dial>48321523</Dial>"),
                   lists:flatten(encode([#say{text="Hello! This is a voice message"},
                                         #say{text="This is another message"},
                                         #dial{body="48321523"}])))
        end},
  
negative.code:      ?_assertEqual(false, is_valid([#gather{num_digits = 333}])),
       ?_assertEqual(false, is_valid([#gather{body = [#play{}, #say{},
                                                      #pause{}]}])),
  
       ?_assertEqual("can you have finish_on_key and num_digits?",
                     "dinnae ken"),
       % RECORD passing
  