added tests for addListener and triggerUpdated