Fix the unit tests in groovy and kotlin