Example of how to test java using spock framework (groovy)