Convert java test to groovy test