Bug 262392 [DataBinding] CompositeMap constructor should use this.firstMap
Using EclEmma, I noticed that large portions of BidiObservableMap are not run, indicating a problem in CompositeMap. This needs more thought. I am attaching a patch, it includes one test case but we may want to add more tests.
tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/observable/map/CompositeMapTest.java
assertEquals(1, tracker.count);
		assertEquals(0, tracker.event.diff.getAddedKeys().size());
		assertEquals(0, tracker.event.diff.getRemovedKeys().size());
		assertEquals(Collections.singleton(person1), tracker.event.diff
				.getChangedKeys());
		assertEquals(new Integer(13), tracker.event.diff.getOldValue(person1));
		assertEquals(new Integer(0), tracker.event.diff.getNewValue(person1));
		assertEquals(new Integer(0), composedMap.get(person1));
	}
	
	public void testChangeInSecondMap() {
		SimplePerson person0 = new SimplePerson("p0", "a0", "c0", "s0");
		person0.getCart().setNumItems(13);
		persons.add(person0);
		MapChangeEventTracker tracker = new MapChangeEventTracker();
		composedMap.addMapChangeListener(tracker);
		assertEquals(0, tracker.count);
		person0.getCart().setNumItems(42);
		assertEquals(1, tracker.count);
		assertEquals(0, tracker.event.diff.getAddedKeys().size());
		assertEquals(0, tracker.event.diff.getRemovedKeys().size());
		assertEquals(Collections.singleton(person0), tracker.event.diff
				.getChangedKeys());
		assertEquals(new Integer(13), tracker.event.diff.getOldValue(person0));
		assertEquals(new Integer(42), tracker.event.diff.getNewValue(person0));
		assertEquals(new Integer(42), composedMap.get(person0));
	}
	
}