### Question:
ObjectPidsPath extends AbstractObjectPath { @Override public ObjectPidsPath cutHead(int indexFrom) { return new ObjectPidsPath(super.cutHeadInternal(indexFrom)); } ObjectPidsPath(String... pathFromRootToLeaf);  ObjectPidsPath(List<String> pathFromRootToLeaf); @Override ObjectPidsPath cutHead(int indexFrom); @Override ObjectPidsPath cutTail(int indexFrom); @Override ObjectPidsPath injectRepository(); ObjectPidsPath injectCollections(CollectionsManager col); @Override ObjectPidsPath replace(String src, String dest); @Override ObjectPidsPath injectObjectBetween(String injectingObject, Between between); static final Logger LOGGER; static ObjectPidsPath REPOSITORY_PATH; }### Answer:
@Test public void testCutHeads() { List<String> relsExtPath = new ArrayList<String>() { { add("uuid:root"); add("uuid:monograph"); add("uuid:internalpart"); add("uuid:page"); } }; List<String> cutHeadPath0 = new ArrayList<String>() { { add("uuid:monograph"); add("uuid:internalpart"); add("uuid:page"); } }; List<String> cutHeadPath1 = new ArrayList<String>() { { add("uuid:internalpart"); add("uuid:page"); } }; List<String> cutHeadPath2 = new ArrayList<String>() { { add("uuid:page"); } }; ObjectPidsPath path = new ObjectPidsPath(relsExtPath.toArray(new String[relsExtPath.size()])); ObjectPidsPath cutHead0 = path.cutHead(0); TestCase.assertEquals(Arrays.asList(cutHead0.getPathFromRootToLeaf()), cutHeadPath0); ObjectPidsPath cutHead1 = path.cutHead(1); TestCase.assertEquals(Arrays.asList(cutHead1.getPathFromRootToLeaf()), cutHeadPath1); ObjectPidsPath cutHead2 = path.cutHead(2); TestCase.assertEquals(Arrays.asList(cutHead2.getPathFromRootToLeaf()), cutHeadPath2); }