Cleanup in tests
#Fixed SCL-3433 Scala @throws annotations cause good code to be red when called from Java code.