Bug 160000 [DataBinding] Convert scenarios to official APIs
tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ComboScenarios.java
Adventure skiAdventure = SampleData.WINTER_HOLIDAY; 
        
        cviewer.setLabelProvider(lodgingLabelProvider);
        
        cviewer.setContentProvider(new ObservableListContentProvider());
        cviewer.setLabelProvider(new LabelProvider() {
            public String getText(Object element) {
                return ((Lodging) element).getName();
            }
        });
        IObservableList list = new WritableList(Lodging.class);
        list.addAll(Arrays.asList(catalog.getLodgings()));
        cviewer.setInput(list);
        
        assertArrayEquals(catalog.getLodgings(), getViewerContent(cviewer).toArray());
        
        assertEquals(getColumn(catalog.getLodgings(), "name"), getComboContent());
        getDbc().bindValue(ViewersObservables.observeSingleSelection(cviewer),
                BeansObservables.observeValue(skiAdventure, "defaultLodging"),
                null);
        
        assertEquals(getViewerSelection(), skiAdventure.getDefaultLodging());
        
        
        for (int i = 0; i < catalog.getLodgings().length; i++) {
            Object selection = catalog.getLodgings()[i];
            cviewer.setSelection(new StructuredSelection(selection));
            assertEquals(selection, skiAdventure.getDefaultLodging());
            assertEquals(getViewerSelection(), skiAdventure.getDefaultLodging());
        }