Assert.assertEquals(3, nniList.size());
}
public void testUnionGetters() throws Exception
{
UnionsDocument unions = UnionsDocument.Factory.parse(
"<lut:unions xmlns:lut='http://openuri.org/lut'><lut:nni>unbounded</lut:nni><lut:sizes>2 3 5 7 11</lut:sizes></lut:unions>");
Assert.assertEquals("unbounded", unions.getUnions().getNni());
Assert.assertTrue(unions.getUnions().getSizes() instanceof List);
List sizes = (List)unions.getUnions().getSizes();
Assert.assertEquals(new Integer(2), sizes.get(0));
Assert.assertEquals(new Integer(3), sizes.get(1));
Assert.assertEquals(new Integer(5), sizes.get(2));
Assert.assertEquals(new Integer(7), sizes.get(3));
Assert.assertEquals(new Integer(11), sizes.get(4));
Assert.assertEquals(5, sizes.size());
UnionsDocument unions2 = UnionsDocument.Factory.parse(
"<lut:unions xmlns:lut='http://openuri.org/lut'><lut:nni>37</lut:nni><lut:sizes>all</lut:sizes></lut:unions>");
Assert.assertEquals(BigInteger.valueOf(37), unions2.getUnions().getNni());
Assert.assertEquals("all", unions2.getUnions().getSizes());
}