Tweak things for Java and Scala tests.