@Test
    void testNullItemFailsProperly() {
        NullItem n = new NullItem();
        n.setIndexName("nalle");
        boolean caught = false;
        try {
            n.encode(ByteBuffer.allocate(100));
        } catch (RuntimeException e) {
            caught = true;
        }
        assertTrue(caught);
        caught = false;
        try {
            n.getItemType();
        } catch (RuntimeException e) {
            caught = true;
        }
        assertTrue(caught);
        assertEquals(0, n.getTermCount());
    }
Check basic contracts common to "many" item implementations.

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