Fixed sonar issues, check for MC available in tests (in order to make Travis builds work, which do not allow MCs)