@SuppressWarnings("unchecked")
@Test
public void shouldMapNestedList() {

	final ArrayNode<IJsonNode> input =
		new ArrayNode<IJsonNode>().add(new ArrayNode<IJsonNode>().add(new TextNode("field1")).add(new IntNode(1)))
			.add(new ArrayNode<IJsonNode>().add(new TextNode("field2")).add(new IntNode(2)));
	final List<Object[]> expected = Arrays.asList(new Object[] { "field1", 1 }, new Object[] { "field2", 2 });
	final Object actual = this.mapper.map(input, null, new TypeToken<List<Object[]>>() {
	}.getType());
	Assert.assertTrue(actual instanceof List);
	Assert.assertEquals(2, ((List<Object>) actual).size());
	Assert.assertArrayEquals(expected.get(0), ((List<Object[]>) actual).get(0));
	Assert.assertArrayEquals(expected.get(1), ((List<Object[]>) actual).get(1));
	final List<List<Object>> expected2 =
		Arrays.asList(Arrays.<Object> asList("field1", 1), Arrays.<Object> asList("field2", 2));
	Assert.assertEquals(expected2,
		this.mapper.map(input, null, new TypeToken<List<List<Object>>>() {
		}.getType()));
	Assert.assertEquals(expected2, this.mapper.map(input));
}