@Test
    final void testWordAlternativesItem() {
        List<Alternative> terms = new ArrayList<>();
        List<Alternative> expected;
        terms.add(new Alternative("1", 1.0));
        terms.add(new Alternative("2", 1.0));
        terms.add(new Alternative("3", 1.0));
        terms.add(new Alternative("4", 1.0));
        expected = new ArrayList<>(terms);
        terms.add(new Alternative("1", .1));
        terms.add(new Alternative("2", .2));
        terms.add(new Alternative("3", .3));
        terms.add(new Alternative("4", .4));
        WordAlternativesItem w = new WordAlternativesItem("", true, null, terms);
        assertEquals(expected, w.getAlternatives());
    }
Functional test for the contracts in WordAlternativesItem.

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