### Question:
GetStartKeyForRoot implements Function<Range,Key> { @Override public Key apply(Range input) { Key k = input.getStartKey(); return TLD.buildParentKey(k.getRow(), TLD.parseRootPointerFromId(k.getColumnFamilyData()), k.getColumnQualifierData(), k.getColumnVisibility(), k.getTimestamp()); }  static GetStartKeyForRoot instance(); @Override Key apply(Range input);  }### Answer:
@Test public void testApply() { String shard = "20190314_0"; String doc = "datatype\u0000p1.p2.p3.c1.gc1"; Key start = new Key(shard, doc); Key end = new Key(shard, doc + "\uffff"); Range range = new Range(start, true, end, false); Key expected = new Key(shard, "datatype\u0000p1.p2.p3"); assertEquals(expected, GetStartKeyForRoot.instance().apply(range)); }