Bug 159940 [DataBinding] DataBindingContext shouldn't expose the bindings list as a mutable list
Currently in DataBindingContext getBindings() exposes the bindings observable list as a mutable observable list. I think we need to make this an unmodifiable list and also add a removeBinding(Binding binding) method to the API of DataBindingContext so that the DBC can remove itself from the binding when removed from the DBC. I'll create a patch soon.
tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/DatabindingContextTest.java
fail("Expected binding exception.");
		} catch (BindingException be) {
		}
	}
	
	public void testFillBindSpecDefaultsMultipleConvertersAndValidators() throws Exception {
		DataBindingContext dbc = new DataBindingContext();
		dbc.addBindSupportFactory(new DefaultBindSupportFactory());
		
		BindSpec bs = new BindSpec();
		bs.setModelToTargetConverters(new IConverter[] {
				null, new ToStringConverter(), null
		});
		bs.setTargetToModelConverters(new IConverter[] {
				null, new ConvertString2Byte(), null
		});
		
		dbc.fillBindSpecDefaults(dbc, bs, Object.class, Object.class);
		
		assertConverterType(bs, 0, IdentityConverter.class, bs.getModelToTargetConverters());
		assertConverterType(bs, 1, ToStringConverter.class, bs.getModelToTargetConverters());
		assertConverterType(bs, 2, IdentityConverter.class, bs.getModelToTargetConverters());
		assertConverterType(bs, 0, IdentityConverter.class, bs.getTargetToModelConverters());
		assertConverterType(bs, 1, ConvertString2Byte.class, bs.getTargetToModelConverters());
		assertConverterType(bs, 2, IdentityConverter.class, bs.getTargetToModelConverters());
	}
	public void testWithDefaults() throws Exception {
	    org.eclipse.jface.databinding.DataBindingContext dbc = new org.eclipse.jface.databinding.DataBindingContext();
        assertNull("converter should not exist by default", dbc.createConverter(String.class, String.class));