void (int count) { Object[] array = new Object[count]; for (int i = 0; i < count; i++) array[i] = i; TreePath path = TreePathUtil.convertArrayToTreePath(array); Assert.assertEquals(count, path.getPathCount()); Assert.assertEquals(count - 1, path.getLastPathComponent()); try { Assert.assertEquals(path, new TreePath(array)); } catch (StackOverflowError error) { System.out.println("StackOverflow - new TreePath: " + count); } }