Groovy originally never had static typing, but was only a dynamic typed complement to Java&#x27;s static typing. It worked best for this purpose (e.g. testing and manipulating Java classes, scripting in Grails, a DSL for build scripts in Gradle) but fell flat when version 2 retrofitted it with static typing and promoted it as a replacement for Java, on the JVM and Android. Best to use Groovy with a language built from the ground up to be statically typed, like Java, Scala, or Kotlin.<p>Having said that, I&#x27;ve actually since found Clojure to be better than Groovy at testing Java classes. A well-placed macro can often cut out syntactic clutter when testing some repetitive scenario.