@Test
    public void testSerializeDeserialize() {
        {
            AlternateSpanList alternateSpanList = new AlternateSpanList();
            serializeAndAssert(alternateSpanList);
        }
        {
            AlternateSpanList alternateSpanList = new AlternateSpanList();
            Span s1 = new Span(1, 2);
            Span s2 = new Span(3, 4);
            Span s3 = new Span(4, 5);
            alternateSpanList.add(s1).add(s2).add(s3);
            AlternateSpanList s4 = new AlternateSpanList();
            Span s5 = new Span(7, 8);
            Span s6 = new Span(8, 9);
            s4.add(s5).add(s6);
            alternateSpanList.add(s4);

            List<SpanNode> alternateChildren = new ArrayList<>();
            Span s7 = new Span(1, 4);
            Span s8 = new Span(1, 9);
            Span s9 = new Span(5, 10);
            alternateChildren.add(s7);
            alternateChildren.add(s8);
            alternateChildren.add(s9);

            alternateSpanList.addChildren(alternateChildren, 5.55);

            serializeAndAssert(alternateSpanList);
        }
    }
@author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a>
document/src/test/java/com/yahoo/document/annotation/AlternateSpanListTestCase.java