Bug 160000 [DataBinding] Convert scenarios to official APIs
tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/MasterDetailScenarios.java
assertArrayEquals(catalog.getLodgings(), getViewerContent(listViewer)
				.toArray());
		IObservableValue selectedLodging = ViewersObservables
				.observeSingleSelection(listViewer);
		selectedLodging.setValue(SampleData.CAMP_GROUND);
		assertEquals(SampleData.CAMP_GROUND, getViewerSelection(listViewer));
		Text txtName = new Text(getComposite(), SWT.BORDER);
		getDbc().bindValue(
				SWTObservables.observeText(txtName, SWT.Modify),
				MasterDetailObservables.detailValue(selectedLodging,
						BeansObservables.valueFactory(realm, "name"),
						String.class), null);
		assertEquals(txtName.getText(), SampleData.CAMP_GROUND.getName());
		enterText(txtName, "foobar");
		assertEquals("foobar", SampleData.CAMP_GROUND.getName());
		listViewer.setSelection(new StructuredSelection(
				SampleData.FIVE_STAR_HOTEL));
		assertEquals(SampleData.FIVE_STAR_HOTEL, selectedLodging.getValue());
		assertEquals(SampleData.FIVE_STAR_HOTEL.getName(), txtName.getText());
		SampleData.FIVE_STAR_HOTEL.setName("barfoo");
		assertEquals("barfoo", txtName.getText());
		
		
		selectedLodging.dispose();