Refs #5583: add tests
Merge pull request #2 from fanf/bug_5583/dev/allow_mutliple_agent

Refs #5583: add tests