 
     ESME.send_pdu(context[:esme], pdu1)
     ESME.send_pdu(context[:esme], pdu2)
-
     :timer.sleep(50)
 
     assert {:ok, {:pdu, pdu1r}, rest_data} = Server.received_data(context[:server]) |> SMPPEX.Protocol.parse
     assert {:ok, {:pdu, pdu2r}, _} = rest_data |> SMPPEX.Protocol.parse
-
-
     assert Pdu.sequence_number(pdu1r) == 1
     assert Pdu.sequence_number(pdu2r) == 2
   end


  test "call", context do
    ref = make_ref

    ESME.call(context[:esme], ref)
    assert [{:init}, {:handle_call, _, ^ref}] = SupportESME.callbacks_received(context[:esme])
  end

  test "info", context do
    ref = make_ref

    Kernel.send context[:esme], ref

    :timer.sleep(10)

    assert [{:init}, {:handle_info, ^ref}] = SupportESME.callbacks_received(context[:esme])

    pdu = %Pdu{ SMPPEX.Pdu.Factory.bind_transmitter("system_id", "password") | sequence_number: 123 }
    {:ok, pdu_data} = SMPPEX.Protocol.build(pdu)
    Server.send(context[:server], pdu_data)
    :timer.sleep(50)

    assert [{:init}, {:handle_pdu, received_pdu}] = SupportESME.callbacks_received(context[:esme])

    reply_pdu = SMPPEX.Pdu.Factory.bind_transmitter_resp(0)
    ESME.reply(context[:esme], received_pdu, reply_pdu)
    :timer.sleep(50)

    assert {:ok, {:pdu, reply_received}, _} = Server.received_data(context[:server]) |> SMPPEX.Protocol.parse
