list.add(element);
proxy.addContent(new ProxyText());
details.setProxiedElements(list.iterator());
proxy.selectionChanged(new ODOMElementSelectionEvent(list));
String text = proxy.getText();
assertNotNull("Text should exist", text);
assertEquals("Text value incorrect", sampleText, text);
// Check that the proxy is updated correctly
final String otherSample = "lazydog";
element.setText(otherSample);
text = proxy.getText();
assertNotNull("Text should exist", text);
assertEquals("Text value incorrect", otherSample, text);
// Check that aggregation works correctly
final ODOMElement otherElement =
(ODOMElement) odomFactory.element("test");
otherElement.setText(otherSample);
list = new ArrayList(2);
list.add(element);
list.add(otherElement);
proxy.selectionChanged(new ODOMElementSelectionEvent(list));
// Identical text values should be passed through
text = proxy.getText();
assertNotNull("Text should exist", text);