### Question:
TLD { public static boolean isRootPointer(ByteSequence id) { ArrayList<Integer> dots = instancesOf('.', id); return dots.size() <= 2; } private  TLD(); static ByteSequence parsePointerFromFI(ByteSequence cq); static ByteSequence parseParentPointerFromId(ByteSequence id); static ByteSequence parseFieldAndValueFromFI(ByteSequence cf, ByteSequence cq); static ByteSequence parseFieldAndValueFromTF(ByteSequence cq); static ByteSequence parseRootPointerFromFI(ByteSequence cq); static ByteSequence parseRootPointerFromId(ByteSequence id); static String parseRootPointerFromId(String id); static ByteSequence estimateRootPointerFromId(ByteSequence id); static boolean isRootPointer(ByteSequence id); static ByteSequence fromString(String s); static ArrayList<Integer> instancesOf(int b, ByteSequence sequence); static ArrayList<Integer> instancesOf(int b, ByteSequence sequence, int repeat); static ArrayList<Integer> lastInstancesOf(int b, ByteSequence sequence, int repeat); static Key buildParentKey(Text shard, ByteSequence id, ByteSequence cq, Text cv, long ts); static Key getNextParentKey(Key docKey);  }### Answer:
@Test public void testIsRootPointer() { ByteSequence root = new ArrayByteSequence(rootId); ByteSequence child = new ArrayByteSequence(childId); ByteSequence grandchild = new ArrayByteSequence(grandchildId); assertTrue(TLD.isRootPointer(root)); assertFalse(TLD.isRootPointer(child)); assertFalse(TLD.isRootPointer(grandchild)); }