pmd warnings fixed

pmd warnings fixed and some sleep calls added to tests.

jenkins test successful:
https://jenkins.catrob.at/job/Catroid-Multi-Job-Custom-Branch/1403/