@Test
public final void testIteratorHelper() {

    List<String> fruits = new ArrayList<String>(LIST_SIZE);
    fruits.add("Apple");
    fruits.add("Orange");
    fruits.add("Pear");
    assertTrue(IteratorHelper.contains(fruits.iterator(), "Apple"));
    assertFalse(IteratorHelper.contains(fruits.iterator(), "Potato"));
    try {
        IteratorHelper.contains(fruits.iterator(), null);
        Assert.fail("Expected NullPointerException missing");
    } catch (NullPointerException e) {
        // that's expected
        assertNotNull(e); // to satisfy checkstyle
    }
    try {
        IteratorHelper.contains(null, "Apple");
        fail("Expected NullPointerException missing");
    } catch (NullPointerException e) {
        // that's expected
        assertNotNull(e); // to satisfy checkstyle
    }
    assertEquals(IteratorHelper.size(fruits.iterator()), LIST_SIZE,
            "Unexpected size delivered.");
    try {
        IteratorHelper.size(null);
        Assert.fail("Expected NullPointerException missing");
    } catch (NullPointerException e) {
        // that's expected
        assertNotNull(e); // to satisfy checkstyle
    }
}