     pdu.sequence_number |> to_int
   end
 
-  @spec mandatory_field(t, atom) :: any
+  @spec mandatory_field(t, atom) :: term
 
   @doc """
   Get Pdu mandatory field. If Pdu does not have the field, `nil` is returned.



  """
  def new(header, m_fields \\ %{}, opt_fields \\ %{}) do
    case header do
      c_id when is_integer(c_id) ->
        %Pdu{
          command_id: c_id,
          ref: make_ref,
          mandatory: m_fields,
          optional: opt_fields
        }
      {c_id, c_status, s_number} ->
        %Pdu{

    pdu.command_status |> to_int
  end

  @spec sequence_number(t) :: non_neg_integer

  @doc """
  Returns Pdu's `sequence_number`.
