public void testNullArray() { try { Iterator iter = makeArrayIterator(null); fail("Constructor should throw a NullPointerException when constructed with a null array"); } catch (NullPointerException e) { // expected } ObjectArrayIterator iter = makeArrayIterator(); try { iter.setArray(null); fail("setArray(null) should throw a NullPointerException"); } catch (NullPointerException e) { // expected } }