@Test
    void testIdStuff() {
        Item i;
        String expected = "i";
        i = new ExactStringItem(expected);
        assertEquals(ItemType.EXACT, i.getItemType());
        assertEquals("EXACTSTRING", i.getName());
        assertEquals(expected, ((ExactStringItem) i).stringValue());
        i = new PrefixItem("p");
        assertEquals(ItemType.PREFIX, i.getItemType());
        assertEquals("PREFIX", i.getName());
        i = new SubstringItem("p");
        assertEquals(ItemType.SUBSTRING, i.getItemType());
        assertEquals("SUBSTRING", i.getName());
        i = new SuffixItem("p");
        assertEquals(ItemType.SUFFIX, i.getItemType());
        assertEquals("SUFFIX", i.getName());
        i = new WeightedSetItem("nalle");
        assertEquals(ItemType.WEIGHTEDSET, i.getItemType());
        assertEquals("WEIGHTEDSET", i.getName());
        i = new AndSegmentItem("", false, false);
        assertEquals(ItemType.AND, i.getItemType());
        assertEquals("SAND", i.getName());
        i = new WeakAndItem();
        assertEquals(ItemType.WEAK_AND, i.getItemType());
        assertEquals("WEAKAND", i.getName());
    }
Check basic contracts common to "many" item implementations.

@author Steinar Knutsen
container-search/src/test/java/com/yahoo/prelude/query/ItemsCommonStuffTestCase.java