@Override
        public void resolve(Choice choice, Query query, Result result, Resolution resolution) {
            invocationNumber++;
            if (invocationNumber == 2)
                assertEquals("method1", choice.getMethod());
            else if (invocationNumber == 3)
                assertEquals("method2", choice.getMethod());
            else if (invocationNumber > 3)
                throw new IllegalStateException("Unexpected number of resolver invocations");

            super.resolve(choice, query, result, resolution);
        }
Chooses the last alternative of any choice
container-search/src/test/java/com/yahoo/search/pagetemplates/engine/test/ChoiceOfSubsectionsTestCase.java