### Question:
TreeNode extends Rectangle implements Iterable<TreeNode>, javax.swing.tree.TreeNode { private void copy(final Collection<Tile> tiles) { if (tile != null) { tiles.add(tile); } TreeNode child = firstChildren; while (child != null) { child.copy(tiles); child = child.nextSibling; } } protected  TreeNode(); protected  TreeNode(final Rectangle bounds); void addChild(final TreeNode child); void removeChildren(); void remove(); final Tile getUserObject(); final TreeNode getParent(); final boolean isRoot(); final boolean isLeaf(); final boolean getAllowsChildren(); boolean hasOverlaps(); final TreeNode getChild(); final int getChildCount(); final TreeNode getChildAt(int index); final int getIndex(final javax.swing.tree.TreeNode node); final Enumeration<TreeNode> children(); final Iterator<TreeNode> iterator(); final boolean remove(final Tile tile); final boolean containsAll(final Collection<Tile> tiles); final Collection<Tile> containedIn(final Rectangle roi); final Collection<Tile> intersecting(final Rectangle roi); @Override final boolean equals(final Object other); final boolean deepEquals(final TreeNode other); final String toTree(); @Override final String toString();  }### Answer:
@Test public void testRTree() throws IOException { final RTree tree = new RTree(root); if (false) { show(OptionalDependencies.copy(root)); } assertEquals(new Rectangle(SOURCE_SIZE*4, SOURCE_SIZE*2), tree.getBounds()); assertEquals(new Dimension(TARGET_SIZE, TARGET_SIZE), tree.getTileSize()); int[] subsamplings; subsamplings = new int[] {5,15,15,45,90}; checkSubsampling((GridNode) root, subsamplings, subsamplings.length, 3, 0); subsamplings = new int[] {1,3,9,9,45,90}; checkSubsampling((GridNode) root, subsamplings, subsamplings.length, 4, 1); }