update taskmanager rule, add more unittest for rules