@Test
public void shouldMapArray() {

	final ArrayNode<IJsonNode> expected =
		new ArrayNode<IJsonNode>().add(new TextNode("field1")).add(new IntNode(1));
	final Object[] input = new Object[] { "field1", 1 };
	Assert.assertEquals(expected, this.mapper.map(input));
	Assert.assertEquals(expected, this.mapper.map(input, null, CachingArrayNode.class));
	Assert.assertEquals(expected, this.mapper.map(input, null, IArrayNode.class));
	Assert.assertEquals(expected, this.mapper.map(input, null, ArrayNode.class));
	Assert.assertEquals(expected, this.mapper.map(input, null, new TypeToken<ArrayNode<IJsonNode>>() {
	}.getType()));
	Assert.assertEquals(expected, this.mapper.map(input, null, new TypeToken<IArrayNode<IJsonNode>>() {
	}.getType()));
	Assert.assertEquals(expected, this.mapper.map(input, null, new TypeToken<IArrayNode<AbstractJsonNode>>() {
	}.getType()));
	Assert.assertSame(CachingArrayNode.class, this.mapper.getDefaultMappingType(Object[].class));
}