void (JTree tree, boolean increase, boolean decrease, String... expected) { int length = expected.length; if (length < 2) throw new IllegalArgumentException(); if (!increase && !decrease) throw new IllegalArgumentException(); assertTree(tree, expected[0]); if (increase) { for (int i = 1; i < expected.length; i++) { provider.increaseSelection(tree); assertTree(tree, expected[i]); } } if (decrease) { for (int i = 1; i < expected.length; i++) { provider.decreaseSelection(tree); assertTree(tree, expected[increase ? expected.length - 1 - i : i]); } } }