Converts task tests from groovy to java
Reduce memory usage in BrooklynGarbageCollector