Refactored tests into Spock tests