minor tweak on test code
use CopyOnWriteList for performance reasons