added tests for matching instanceId and survey, + more tests