public void testParser() throws Exception
{
ArrayNode n = new ArrayNode(JsonNodeFactory.instance);
n.add(123);
TreeTraversingParser p = new TreeTraversingParser(n, null);
p.setCodec(null);
assertNull(p.getCodec());
assertNotNull(p.getParsingContext());
assertNotNull(p.getTokenLocation());
assertNotNull(p.getCurrentLocation());
assertNull(p.getEmbeddedObject());
assertNull(p.currentNode());
//assertNull(p.getNumberType());
assertToken(JsonToken.START_ARRAY, p.nextToken());
p.skipChildren();
assertToken(JsonToken.END_ARRAY, p.getCurrentToken());
p.close();
p = new TreeTraversingParser(n, null);
p.nextToken();
assertToken(JsonToken.VALUE_NUMBER_INT, p.nextToken());
assertEquals(JsonParser.NumberType.INT, p.getNumberType());
p.close();
}