@Test
public void renameAttribute() {

	String message;
	
	assertTrue(this.testData.hasAttribute("A"));  //$NON-NLS-1$
	assertFalse(this.testData.hasAttribute("X"));  //$NON-NLS-1$
	assertTrue(this.testData.hasAttribute("B"));  //$NON-NLS-1$
	assertFalse(this.testData.hasAttribute("Y"));  //$NON-NLS-1$
	assertTrue(this.testData.hasAttribute("C"));  //$NON-NLS-1$
	assertTrue(this.testData.hasAttribute("D"));  //$NON-NLS-1$
	assertFalse(this.testData.hasAttribute("Z"));  //$NON-NLS-1$
	assertTrue(this.testData.hasAttribute("E"));  //$NON-NLS-1$
	assertTrue(this.testData.hasAttribute("F"));  //$NON-NLS-1$
	
	AttributeValue oldValue = this.testData.getAttribute("B");  //$NON-NLS-1$
	assertTrue(this.testData.renameAttribute("B", "ZZZ", false));   //$NON-NLS-1$ //$NON-NLS-2$
	// Testing events
	message = this.id+": renaming B to ZZZ";  //$NON-NLS-1$
	this.listenerStub.assertTypes(message, AttributeChangeEvent.Type.RENAME);
	this.listenerStub.assertNames(message, "ZZZ");  //$NON-NLS-1$
	this.listenerStub.assertOldNames(message, "B");  //$NON-NLS-1$
	this.listenerStub.assertValues(message, oldValue);
	this.listenerStub.assertOldValues(message, oldValue);
	this.listenerStub.reset();
	assertTrue(this.testData.hasAttribute("A"));  //$NON-NLS-1$
	assertFalse(this.testData.hasAttribute("X"));  //$NON-NLS-1$
	assertFalse(this.testData.hasAttribute("B"));  //$NON-NLS-1$
	assertTrue(this.testData.hasAttribute("ZZZ"));  //$NON-NLS-1$
	assertFalse(this.testData.hasAttribute("Y"));  //$NON-NLS-1$
	assertTrue(this.testData.hasAttribute("C"));  //$NON-NLS-1$
	assertTrue(this.testData.hasAttribute("D"));  //$NON-NLS-1$
	assertFalse(this.testData.hasAttribute("Z"));  //$NON-NLS-1$
	assertTrue(this.testData.hasAttribute("E"));  //$NON-NLS-1$
	assertTrue(this.testData.hasAttribute("F"));  //$NON-NLS-1$
	
	assertEquals(oldValue, this.testData.getAttribute("ZZZ"));  //$NON-NLS-1$
	assertFalse(this.testData.renameAttribute("toto", "XXX", false));   //$NON-NLS-1$ //$NON-NLS-2$
	// Testing events
	message = this.id+": renaming toto to XXX";  //$NON-NLS-1$
	this.listenerStub.assertEmpty(message);
	this.listenerStub.reset();
	assertTrue(this.testData.hasAttribute("A"));  //$NON-NLS-1$
	assertFalse(this.testData.hasAttribute("X"));  //$NON-NLS-1$
	assertFalse(this.testData.hasAttribute("B"));  //$NON-NLS-1$
	assertTrue(this.testData.hasAttribute("ZZZ"));  //$NON-NLS-1$
	assertFalse(this.testData.hasAttribute("Y"));  //$NON-NLS-1$
	assertTrue(this.testData.hasAttribute("C"));  //$NON-NLS-1$
	assertTrue(this.testData.hasAttribute("D"));  //$NON-NLS-1$
	assertFalse(this.testData.hasAttribute("Z"));  //$NON-NLS-1$
	assertTrue(this.testData.hasAttribute("E"));  //$NON-NLS-1$
	assertTrue(this.testData.hasAttribute("F"));  //$NON-NLS-1$
	
	oldValue = this.testData.getAttribute("F");  //$NON-NLS-1$
	AttributeValue oldValue2 = this.testData.getAttribute("A");  //$NON-NLS-1$
	assertFalse(this.testData.renameAttribute("F", "A", false));   //$NON-NLS-1$ //$NON-NLS-2$
	// Testing events
	message = this.id+": renaming F to A";  //$NON-NLS-1$
	this.listenerStub.assertEmpty(message);
	this.listenerStub.reset();
	assertTrue(this.testData.hasAttribute("A"));  //$NON-NLS-1$
	assertFalse(this.testData.hasAttribute("X"));  //$NON-NLS-1$
	assertFalse(this.testData.hasAttribute("B"));  //$NON-NLS-1$
	assertTrue(this.testData.hasAttribute("ZZZ"));  //$NON-NLS-1$
	assertFalse(this.testData.hasAttribute("Y"));  //$NON-NLS-1$
	assertTrue(this.testData.hasAttribute("C"));  //$NON-NLS-1$
	assertTrue(this.testData.hasAttribute("D"));  //$NON-NLS-1$
	assertFalse(this.testData.hasAttribute("Z"));  //$NON-NLS-1$
	assertTrue(this.testData.hasAttribute("E"));  //$NON-NLS-1$
	assertTrue(this.testData.hasAttribute("F"));  //$NON-NLS-1$
	
	assertEquals(oldValue, this.testData.getAttribute("F"));  //$NON-NLS-1$
	assertEquals(oldValue2, this.testData.getAttribute("A"));  //$NON-NLS-1$
}