### Question:
SymRef extends Ref { public SymRef(String name, Ref target) { super(name, target.getObjectId()); this.target = target.getName(); } SymRef(String name, Ref target);  SymRef(String name, String target, ObjectId targetId); String getTarget(); @Override String toString(); @Override Ref peel(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void testSymRef() { Ref testRef = new Ref(Ref.REFS_PREFIX + "commit1", ObjectId.valueOf("abc123000000000000001234567890abcdef0000")); SymRef symRef = new SymRef("TestRef", testRef); assertEquals(testRef.getName(), symRef.getTarget()); String symRefString = symRef.toString(); assertEquals("TestRef -> " + "[" + testRef.getName() + " -> " + testRef.getObjectId().toString() + "]", symRefString); }