finished tests for repository-controller
some formatting
added workaround for timing-problems. Added TODO