@Test
public void testReadUnderlyingListCount()
{
final TestResource resource = new TestResource();
final Counter counter = resource.getReadUnderlyingListCounter();
final TestElement element = TestElement.TYPE.instantiate( resource );
final ElementList<Element> list = element.getList();
list.iterator(); // prime
counter.reset();
list.refresh();
assertEquals( 1, counter.read() );
counter.reset();
list.insert();
assertEquals( 1, counter.read() );
counter.reset();
list.remove( 0 );
assertEquals( 1, counter.read() );
counter.reset();
final Element a = list.insert();
final Element b = list.insert();
assertEquals( 2, counter.read() );
counter.reset();
list.moveDown( a );
assertEquals( 1, counter.read() );
counter.reset();
list.moveUp( a );
assertEquals( 1, counter.read() );
counter.reset();
list.move( b, 0 );
assertEquals( 1, counter.read() );
counter.reset();
}