MDL-43337 WebService: Missing break statement added

In function get_enrolled_users_with_capability, tests are also added