Modified resource classes to groovy & added spock tests