Added unit test for repairing long legacy storage ids

Long legacy storage ids are md5 hashes of the string and should also be
repaired properly. This test is here to enforce that.