### Question:
UnionFind { public int find(int i) { if (i < 0 || i >= n) { throw new IllegalArgumentException("Input element " + "should be between 0 (inclusive) " + "and " + n + " (exclusive)"); } while (i != roots[i]) { roots[i] = roots[roots[i]]; i = roots[i]; } return i; } UnionFind(int n); int find(int i); int union(int i, int j); int getSubsetSize(int i); int getSubsetsCount();  }### Answer:
@Test(expected = IllegalArgumentException.class) public void testFindIllegalArgument1() { UnionFind unionFind = new UnionFind(5); unionFind.find(-1); }
@Test(expected = IllegalArgumentException.class) public void testFindIllegalArgument2() { UnionFind unionFind = new UnionFind(5); unionFind.find(5); }