return s;
}
private static ComplexTextStructure createComplexDelimitedTextStructureWithDuplicatedFieldName() {
ComplexTextStructure s = new ComplexTextStructure("Complex", false);
Segment root = Segment.newRootSegment();
s.addSegment(root);
Segment order = new Segment("Order");
order.setOccurrence(SegmentOccurrence.ZeroOrMore);
order.setParentName(root.getName());
Field id = Field.newDelimitedIdentifier("O");
order.fieldList.add(id);
Field date = new Field(1, "Date", FieldDataType.Date.name(), "", "", 0, 0, 0, id);
order.fieldList.add(date);
Field anotherDate = new Field(2, "Date", FieldDataType.Date.name(), "", "", 0, 0, 0, date);