   end
 
   test "decode_type/2: simple types" do
-    import Ser, only: [decode_type: 2]
-
     # booleans
     assert decode_type(<<0, "foo">>, :boolean) == {false, "foo"}
     assert decode_type(<<1, "foo">>, :boolean) == {true, "foo"}

             <<122, 183>>, # value (31415)
             "foo">>

    assert Ser.decode_type(data, :decimal) == {Decimal.new(3.1415), "foo"}
  end

  ## Encoding

  test "encode_value/1: simple types" do
    import Ser, only: [encode_value: 1]

    # booleans
    assert bin(encode_value(true)) == <<1>>
    assert bin(encode_value(false)) == <<0>>

  end

  test "encode_value/1: datetime" do
    datetime = %DateTime{year: 2015, month: 6, day: 30,
                         hour: 12, min: 03, sec: 29, msec: 901}
    assert bin(encode_value(datetime)) == :small_ints.encode_zigzag_varint(1435665809901)
  end

  test "encode_value/1: embedded lists" do
    assert (bin(encode_value(["elem", true])) <> "foo") == @list
  end

  test "encode_value/1: embedded sets" do
    expected = <<4,            # number of items (zigzag, hence 2)
                 23,           # type of the elems in the list, OrientDB only supports ANY
                 0, 1,         # elem type (boolean) + value
