Decouple handleEvent by using predicate in watchTree.