Bug 127861 [DataBinding] Mark API provisional
tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/swt/AbstractGetAndSetSelectionUpdatableCollectionTest.java
public void testGetSelectedObject() {		
		SelectionAwareUpdatableCollection updatable = getSelectionAwareUpdatable(new String[] {"foo", "bar"}); 
		assertEquals("No initial selection should be found.", null, updatable.getSelectedObject());
		setSelectedValueOfControl("bar");
		assertEquals("bar", updatable.getSelectedObject());	
	}
	/*
	 * Test method for 'org.eclipse.jface.internal.databinding.swt.CComboUpdatableCollection.setSelectedObject(Object)'
	 */
	public void testSetSelectedObject() {
		SelectionAwareUpdatableCollection updatable = getSelectionAwareUpdatable(new String[] {"foo", "bar"}); 
		updatable.setSelectedObject("bar");
		assertEquals("bar", getSelectedObjectOfControl());
		updatable.setSelectedObject("bar1");
		assertEquals("bar", getSelectedObjectOfControl());
		updatable.setSelectedObject("foo");
		assertEquals("foo", getSelectedObjectOfControl());
		updatable.setSelectedObject(null);
		assertEquals(null, getSelectedObjectOfControl());		
	}
	
	protected abstract SelectionAwareUpdatableCollection getSelectionAwareUpdatable(String[] values);
	
	protected abstract Object getSelectedObjectOfControl();
	
	protected abstract void setSelectedValueOfControl(String value);
}