anchor.diff:                               ?TEST_MODULE:lookup_poi(accounts, Pubkey4, Poi4)),
   
                   %% Check serialization/deserialization of PoI
  -                %% NOTE: The deserialized poi contains a gb_tree,
  -                %% so it is operation order dependent.
  -                %% The serialized version is canonical, though.
  -                [?assertEqual(?TEST_MODULE:serialize_poi(PoI),
  -                              ?TEST_MODULE:serialize_poi(
  -                                 ?TEST_MODULE:deserialize_poi(
  -                                    ?TEST_MODULE:serialize_poi(PoI))))
  +                [assert_equal_poi(PoI,
  +                                  ?TEST_MODULE:deserialize_poi(
  +                                     ?TEST_MODULE:serialize_poi(PoI)))
                    || PoI <- [Poi1, Poi2, Poi2, Poi3, Poi4]]
           end
         }
       ].
  +
  +assert_equal_poi(PoIExpect, PoIExpr) ->
  +    %% The deserialized poi contains a gb_tree, so it is operation
  +    %% order dependent.  The serialized version is canonical, though.
  +    ?assertEqual(?TEST_MODULE:serialize_poi(PoIExpect),
  +                 ?TEST_MODULE:serialize_poi(PoIExpr)).
  
positive.code:                ?assertEqual({error, not_present},
                              ?TEST_MODULE:add_poi(accounts, AccountPubkey,
                                                   Trees0, Poi0))
         end},
        {"POI for one account",
         fun() ->
  
negative.code:                ?assertEqual(?TEST_MODULE:hash(Trees0),
                              ?TEST_MODULE:poi_hash(Poi0))
         end},
        {"PoI constructed from empty state trees can be serialized/deserialized",
         fun() ->
                 Trees0 = aec_test_utils:create_state_tree(),
                 Poi0 = ?TEST_MODULE:new_poi(Trees0),
                 assert_equal_poi(Poi0,
                                  ?TEST_MODULE:deserialize_poi(
                                     ?TEST_MODULE:serialize_poi(Poi0)))
         end},
        {"Non-empty PoI cannot be constructed from empty state trees",
         fun() ->
                 AccountPubkey = <<123:?MINER_PUB_BYTES/unit:8>>,
  