Added and updated unit tests fur MC agent discovery.