Synchronized access to handlerRegistry to stop ConcurrentModificationException
SLT-267 Fixed issues with AgentRunTest.groovy