String abbr2 = ObjectId.toString(id2).substring(0, 4);
assertFalse(abbr1.equals(abbr2));
ObjectReader reader = ins.newReader();
Collection<ObjectId> objs;
objs = reader.resolve(AbbreviatedObjectId.fromString(abbr1));
assertEquals(1, objs.size());
assertEquals(id1, objs.iterator().next());
objs = reader.resolve(AbbreviatedObjectId.fromString(abbr2));
assertEquals(1, objs.size());