/**
* Tests the reference count access methods.
*/
public void testReferenceCounting() {
UmlModelElement elem = new AbstractUmlModelElement() { };
elem.incrementReferenceCount();
elem.incrementReferenceCount();
assertEquals(2, elem.getReferenceCount());
elem.decrementReferenceCount();
assertEquals(1, elem.getReferenceCount());
elem.decrementReferenceCount();
elem.decrementReferenceCount();
// can not be less than 0
assertEquals(0, elem.getReferenceCount());
}