 
     assert {:ok, {:pdu, _}, rest_data} = Server.received_data(ctx[:server]) |> SMPPEX.Protocol.parse
     assert {:ok, {:pdu, enquire_link}, _} = rest_data |> SMPPEX.Protocol.parse
-    assert Pdu.command_id(enquire_link) |> CommandNames.name_by_id == {:ok, :enquire_link}
+    assert Pdu.command_name(enquire_link) == :enquire_link
   end
 
   test "enquire_link cancel by peer action", ctx do


    assert {:ok, {:pdu, reply_pdu}, _rest_data} = Server.received_data(ctx[:server]) |> SMPPEX.Protocol.parse

    assert Pdu.command_id(reply_pdu) |> CommandNames.name_by_id == {:ok, :bind_transmitter_resp}
  end

  test "handle_pdu with stop", ctx do

    Timer.sleep(50)

    assert {:ok, {:pdu, enquire_link_pdu}, _rest_data} = Server.received_data(ctx[:server]) |> SMPPEX.Protocol.parse
    assert Pdu.command_name(enquire_link_pdu) == :enquire_link
  end

  test "info with stop", ctx do
