RecordStructureManager { public Optional<Structure> select(String path) throws InvalidParameterException { return select(SelectorPath.parse(path)); } RecordStructureManager(ItemHierarchy<Structure> structureHierarchy); Optional<Structure> select(String path); Optional<Structure> select(SelectorPath selectorPath); RepeatSearch createRepeatSearch(TemplateRecordConfiguration recordDefinition); Optional<Structure> repeatRecord(
      Optional<Structure> preceding, RepeatSearch repeatSearch, boolean isFirst); Optional<Structure> repeatField(
      Optional<Structure> preceding, SelectorPath path, int end); void recordMatch(Structure record); void recordMissing(SelectorPath path);  }
@Test public void testGetMissingStructure() throws InvalidParameterException { assertFalse(recordStructureManager.select("Document > Break").isPresent()); }
@Test public void testGetFirstParagraph() throws InvalidParameterException { Optional<Structure> structure = recordStructureManager.select("Document > Paragraph:nth-of-type(1)"); assertTrue(structure.isPresent()); assertEquals(paragraph1, structure.get()); }