turning the groovy test into java