Bug 160000 [DataBinding] Convert scenarios to official APIs
tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ListViewerScenario.java
getLodgingsDetailFactory(Lodging.class),
                Lodging.class);
        listViewer.setContentProvider(new ObservableListContentProvider());
        listViewer.setLabelProvider(new LabelProvider() {
            public String getText(Object element) {
                return ((Lodging) element).getName();
            }
        });
        listViewer.setInput(lodgings);
        
		
		for (int i = 0; i < catalog.getLodgings().length; i++) {
			assertEquals(catalog.getLodgings()[i], listViewer.getElementAt(i));
		}
		
		
		String[] lodgingStrings = new String[catalog.getLodgings().length];
		for (int i = 0; i < catalog.getLodgings().length; i++) {
			lodgingStrings[i] = catalog.getLodgings()[i].getName();
		}
		assertArrayEquals(lodgingStrings, list.getItems());
		
		assertEquals(null, ((IStructuredSelection) listViewer.getSelection())
				.getFirstElement());
		
		
		final Adventure adventure = SampleData.WINTER_HOLIDAY;
        
        IObservableValue selection = ViewersObservables.observeSingleSelection(listViewer);
        getDbc().bindValue(selection, BeansObservables.observeValue(adventure, "defaultLodging"), null);