anchor.diff:      ?assertEqual({ok, 1}, chef_sql:create_cookbook_version(CookbookVersion)),
       Got = chef_sql:fetch_cookbook_version(CookbookVersion#chef_cookbook_version.org_id,
                                             {CookbookVersion#chef_cookbook_version.name,
  -                                           {CookbookVersion#chef_cookbook_version.major,
  -                                            CookbookVersion#chef_cookbook_version.minor,
  -                                            CookbookVersion#chef_cookbook_version.patch}}),
  +                                           version_tuple(CookbookVersion)}),
       ?assertEqual(CookbookVersion, Got).
   
   fetch_cookbook_version_checksums() ->
  
positive.code:     % A cookbook version should already exist in the datastore
      Existing = chef_sql:fetch_cookbook_version(ExistingVersion#chef_cookbook_version.org_id,
                                                 {ExistingVersion#chef_cookbook_version.name,
                                                   {ExistingVersion#chef_cookbook_version.major,
                                                     ExistingVersion#chef_cookbook_version.minor,
                                                     ExistingVersion#chef_cookbook_version.patch}}),
      ?assertEqual(ExistingVersion#chef_cookbook_version{checksums = []}, Existing#chef_cookbook_version{checksums = []}),
      ?assertEqual(NormalizedExistingChecksums, lists:sort(Existing#chef_cookbook_version.checksums)),
  
  
negative.code:     % Prove that the shared checksum have not been overwritten
      Older = chef_sql:fetch_cookbook_version(OlderVersion#chef_cookbook_version.org_id,
                                                 {OlderVersion#chef_cookbook_version.name,
                                                  version_tuple(OlderVersion)}),
      ?assertEqual(lists:sort(OlderChecksums), lists:sort(Older#chef_cookbook_version.checksums)).
  
  
  