@Test
    final void test() {
        PhraseSegmentItem item = new PhraseSegmentItem("a b c", false, true);
        item.addItem(new WordItem("a"));
        item.addItem(new WordItem("b"));
        item.addItem(new WordItem("c"));
        assertEquals(100, item.getItem(0).getWeight());
        item.setWeight(150);
        assertEquals(150, item.getItem(0).getWeight());
        assertEquals(item.getItem(0).getWeight(), item.getItem(1).getWeight());
        assertEquals(item.getItem(0).getWeight(), item.getItem(2).getWeight());
    }
Functional test for the logic in items made up from a single block of text.

@author steinar
container-search/src/test/java/com/yahoo/prelude/query/test/SegmentItemTestCase.java