Bug 160000 [DataBinding] Convert scenarios to official APIs
tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ComboScenarios.java
IObservableList lodgings = MasterDetailObservables.detailList(BeansObservables.observeValue(catalog,
                "lodgings"), getLodgingsDetailFactory(Lodging.class), Lodging.class);
        cviewer.setContentProvider(new ObservableListContentProvider());
        cviewer.setInput(lodgings);
        
        assertArrayEquals(catalog.getLodgings(), getViewerContent(cviewer).toArray());
        
        assertEquals(getColumn(catalog.getLodgings(), "name"), getComboContent());
        ComboViewer otherViewer = new ComboViewer(getComposite(), SWT.NONE);
        otherViewer.setLabelProvider(lodgingLabelProvider);
        lodgings = MasterDetailObservables.detailList(BeansObservables.observeValue(catalog, "lodgings"),
                getLodgingsDetailFactory(Lodging.class),
                Lodging.class);
        otherViewer.setContentProvider(new ObservableListContentProvider());
        otherViewer.setInput(lodgings);
        
        
        
        assertArrayEquals(catalog.getLodgings(), getViewerContent(otherViewer).toArray());
        
        IObservableValue selection = ViewersObservables.observeSingleSelection(cviewer);
        getDbc().bindValue(selection, BeansObservables.observeValue(skiAdventure, "defaultLodging"), null);
        IObservableValue otherSelection = ViewersObservables.observeSingleSelection(otherViewer);
        getDbc().bindValue(otherSelection, BeansObservables.observeValue(skiAdventure, "defaultLodging"), null);
        Lodging lodging = catalog.getLodgings()[0];
        
        
        cviewer.setSelection(new StructuredSelection(lodging));
        assertEquals(((IStructuredSelection) cviewer.getSelection()).getFirstElement(),
                ((IStructuredSelection) otherViewer.getSelection()).getFirstElement());