You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@grails.apache.org by jd...@apache.org on 2026/05/12 16:14:14 UTC

(grails-core) 03/03: Reformatting

This is an automated email from the ASF dual-hosted git repository.

jdaugherty pushed a commit to branch 8.0.x-hibernate7
in repository https://gitbox.apache.org/repos/asf/grails-core.git

commit 5357463b98f3ab415cb85c119e74570a3c27524b
Author: James Daugherty <jd...@jdresources.net>
AuthorDate: Tue May 12 12:09:45 2026 -0400

    Reformatting
---
 .../grails/gorm/services/ServiceImplSpec.groovy    | 80 ++++++++++++----------
 .../services/multitenancy/database/Book.groovy     |  1 +
 .../database/DatabasePerTenantSpec.groovy          | 37 +++++-----
 .../MultiTenantServiceTransformSpec.groovy         | 16 +++--
 .../partitioned/PartitionMultiTenancySpec.groovy   | 29 ++++----
 .../multitenancy/schema/SchemaPerTenantSpec.groovy | 37 +++++-----
 .../specs/AbstractNonGormParentClassSpec.groovy    |  2 +
 .../grails/gorm/specs/CircularCascadeSpec.groovy   | 12 +++-
 .../gorm/specs/CurrentTenantTransformSpec.groovy   | 67 +++++++++---------
 .../gorm/specs/DeepValidateWithSaveSpec.groovy     |  2 +-
 .../DetachedCriteriaAssociationQuerySpec.groovy    |  6 +-
 .../grails/gorm/specs/JpaQueryBuilderSpec.groovy   |  5 +-
 .../gorm/specs/MultipleDataSourceSpec.groovy       |  4 +-
 .../grails/gorm/specs/ReadOnlyCriteriaSpec.groovy  |  3 +-
 .../gorm/specs/SingleCharPropertySpec.groovy       |  6 +-
 .../grails/gorm/specs/SingleResultSpec.groovy      |  6 +-
 .../groovy/grails/gorm/specs/SubquerySpec.groovy   |  2 +-
 .../grails/gorm/specs/TenantServiceSpec.groovy     | 24 ++++---
 .../gorm/specs/TransactionServiceSpec.groovy       | 20 +++---
 .../TransactionalTransformOnServiceSpec.groovy     |  6 +-
 .../WhereMethodEmbeddedInAssociationSpec.groovy    |  4 +-
 .../grails/gorm/specs/WhereMethodSpec.groovy       | 24 ++++---
 .../simple/core/GrailsDataCoreTckManager.groovy    | 16 +++--
 .../gorm/AddToAndInjectedServiceSpec.groovy        | 21 +++---
 .../gorm/AddToMethodWithBasicCollectionSpec.groovy | 27 ++++----
 .../AddToMethodWithEmbeddedCollectionSpec.groovy   |  1 +
 .../datastore/gorm/AssignedIdentifierSpec.groovy   |  2 +
 .../datastore/gorm/AsyncReadMethodsSpec.groovy     |  4 +-
 .../gorm/AutoLinkOneToManyAssociationSpec.groovy   |  6 +-
 .../datastore/gorm/BasicTypeHasManySpec.groovy     |  4 +-
 .../datastore/gorm/BeforeUpdateEventSpec.groovy    |  6 +-
 ...idirectionalOneToManyWithInheritanceSpec.groovy |  4 ++
 .../grails/datastore/gorm/CacheAndJoinSpec.groovy  |  5 +-
 .../datastore/gorm/CircularManyToManySpec.groovy   |  1 +
 .../datastore/gorm/CircularManyToOneSpec.groovy    |  2 +
 .../datastore/gorm/CircularOneToManySpec.groovy    |  7 +-
 .../datastore/gorm/CompositeIdentifierSpec.groovy  | 24 ++++---
 .../org/grails/datastore/gorm/CoreTestSuite.groovy |  5 +-
 .../gorm/CriteriaProjectedResultsSpec.groovy       |  1 +
 .../datastore/gorm/CustomAutoTimestampSpec.groovy  |  9 ++-
 .../gorm/CustomSequenceIdentifierSpec.groovy       |  1 +
 .../gorm/CustomStringIdentifierSpec.groovy         |  2 +
 .../gorm/CustomTypeMarshallingSpec.groovy          |  8 ++-
 .../grails/datastore/gorm/DeindexingSpec.groovy    |  2 +
 .../gorm/DetachedCriteriaJpaEntitySpec.groovy      |  5 +-
 .../datastore/gorm/DistinctProjectionSpec.groovy   |  2 +-
 .../gorm/DomainWithPrimitiveGetterSpec.groovy      | 24 ++++---
 .../gorm/DynamicFinderHungarianNotationSpec.groovy |  3 +-
 .../datastore/gorm/EmbeddedAssociationSpec.groovy  |  6 +-
 ...hNoEntityAndGlobalNullableConstraintSpec.groovy | 21 +++---
 .../gorm/EmbeddedNonEntityAssociationSpec.groovy   |  3 +
 .../gorm/EmbeddedPropertyQuerySpec.groovy          |  5 +-
 .../grails/datastore/gorm/EnumHasManySpec.groovy   |  5 +-
 .../datastore/gorm/FindByDomainInListSpec.groovy   |  6 +-
 .../datastore/gorm/GormDirtyCheckingSpec.groovy    |  6 +-
 .../gorm/HasManyDefaultMappedBySpec.groovy         |  3 +
 .../datastore/gorm/HasOneSetInverseSideSpec.groovy |  5 +-
 .../gorm/InOperatorWithAssociationsSpec.groovy     |  6 +-
 .../gorm/InheritanceWithOneToManySpec.groovy       |  6 +-
 .../gorm/ListOrderByHungarianNotationSpec.groovy   |  3 +-
 .../grails/datastore/gorm/ManyToManySpec.groovy    |  3 +
 .../grails/datastore/gorm/MappedByNoneSpec.groovy  |  5 +-
 .../gorm/NestedAssociationQuerySpec.groovy         |  4 ++
 .../org/grails/datastore/gorm/NotLikeSpec.groovy   |  8 +--
 .../grails/datastore/gorm/NotNullQuerySpec.groovy  |  3 +
 .../datastore/gorm/OneToOneWithProxiesSpec.groovy  |  6 +-
 .../org/grails/datastore/gorm/OrderBySpec.groovy   |  5 +-
 .../datastore/gorm/QueryAssociationSpec.groovy     |  6 +-
 .../gorm/QueryNonIndexedPropertySpec.groovy        |  2 +
 .../gorm/ReadOnlyCriteriaResultsSpec.groovy        |  5 +-
 .../gorm/SaveWithFailOnErrorDefaultSpec.groovy     |  7 +-
 .../datastore/gorm/UUIDTypeIdentifierSpec.groovy   |  1 +
 .../grails/datastore/gorm/UUIIdentifierSpec.groovy |  2 +
 .../schemaless/ImplementsDynamicAttributes.groovy  |  2 +
 .../gorm/validation/UniqueConstraintSpec.groovy    | 12 ++--
 .../datastore/mapping/EntityReflectorSpec.groovy   |  3 +
 76 files changed, 469 insertions(+), 265 deletions(-)

diff --git a/grails-datamapping-core-test/src/test/groovy/grails/gorm/services/ServiceImplSpec.groovy b/grails-datamapping-core-test/src/test/groovy/grails/gorm/services/ServiceImplSpec.groovy
index d1242d0284..f18e0867ac 100644
--- a/grails-datamapping-core-test/src/test/groovy/grails/gorm/services/ServiceImplSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/grails/gorm/services/ServiceImplSpec.groovy
@@ -18,26 +18,30 @@
  */
 package grails.gorm.services
 
+import groovy.json.DefaultJsonGenerator
+import groovy.json.JsonGenerator
+
+import spock.lang.AutoCleanup
+import spock.lang.Issue
+import spock.lang.Specification
+
+import org.springframework.context.support.StaticMessageSource
+
 import grails.gorm.annotation.Entity
 import grails.gorm.validation.PersistentEntityValidator
 import grails.validation.ValidationException
-import groovy.json.DefaultJsonGenerator
-import groovy.json.JsonGenerator
 import org.grails.datastore.gorm.validation.constraints.eval.DefaultConstraintEvaluator
 import org.grails.datastore.gorm.validation.constraints.registry.DefaultConstraintRegistry
 import org.grails.datastore.gorm.validation.constraints.registry.DefaultValidatorRegistry
 import org.grails.datastore.mapping.simple.SimpleMapDatastore
-import org.springframework.context.support.StaticMessageSource
-import spock.lang.AutoCleanup
-import spock.lang.Issue
-import spock.lang.Specification
 
 /**
  * Created by graemerocher on 06/02/2017.
  */
 class ServiceImplSpec extends Specification {
 
-    @AutoCleanup SimpleMapDatastore datastore = new SimpleMapDatastore(
+    @AutoCleanup
+    SimpleMapDatastore datastore = new SimpleMapDatastore(
             Product
     )
 
@@ -47,8 +51,8 @@ class ServiceImplSpec extends Specification {
 
     void "test inter service interaction"() {
         given:
-        Product p1 = new Product(name: "Apple", type:"Fruit").save(flush:true)
-        Product p2 = new Product(name: "Orange", type:"Fruit").save(flush:true)
+        Product p1 = new Product(name: "Apple", type: "Fruit").save(flush: true)
+        Product p2 = new Product(name: "Orange", type: "Fruit").save(flush: true)
         AnotherProductService productService = datastore.getService(AnotherProductService)
 
         expect:
@@ -58,12 +62,12 @@ class ServiceImplSpec extends Specification {
 
     void "test list products"() {
         given:
-        Product p1 = new Product(name: "Apple", type:"Fruit").save(flush:true)
-        Product p2 = new Product(name: "Orange", type:"Fruit").save(flush:true)
+        Product p1 = new Product(name: "Apple", type: "Fruit").save(flush: true)
+        Product p2 = new Product(name: "Orange", type: "Fruit").save(flush: true)
         ProductService productService = datastore.getService(ProductService)
 
         expect:
-        productService.listWithArgs(max:1).size() == 1
+        productService.listWithArgs(max: 1).size() == 1
         productService.listProducts().size() == 2
         productService.listMoreProducts().length == 2
         productService.findEvenMoreProducts().iterator().hasNext()
@@ -80,7 +84,7 @@ class ServiceImplSpec extends Specification {
         productService.get(100) == null
         productService.find("Apple", "Fruit") != null
         productService.find("Orange", "Fruit").name == "Orange"
-        productService.find("Apple", "Fruit", [max:2]) != null
+        productService.find("Apple", "Fruit", [max: 2]) != null
         productService.find("Apple", "Device") == null
     }
 
@@ -96,8 +100,8 @@ class ServiceImplSpec extends Specification {
 
     void "test delete by id implementation"() {
         given:
-        Product p1 = new Product(name: "Apple", type:"Fruit").save(flush:true)
-        Product p2 = new Product(name: "Orange", type:"Fruit").save(flush:true)
+        Product p1 = new Product(name: "Apple", type: "Fruit").save(flush: true)
+        Product p2 = new Product(name: "Orange", type: "Fruit").save(flush: true)
         ProductService productService = datastore.getService(ProductService)
 
         when:
@@ -117,8 +121,8 @@ class ServiceImplSpec extends Specification {
 
     void "test delete by parameter query implementation"() {
         given:
-        Product p1 = new Product(name: "Apple", type:"Fruit").save(flush:true)
-        Product p2 = new Product(name: "Orange", type:"Fruit").save(flush:true)
+        Product p1 = new Product(name: "Apple", type: "Fruit").save(flush: true)
+        Product p2 = new Product(name: "Orange", type: "Fruit").save(flush: true)
         ProductService productService = datastore.getService(ProductService)
 
         when:
@@ -138,8 +142,8 @@ class ServiceImplSpec extends Specification {
 
     void "test delete all implementation"() {
         given:
-        Product p1 = new Product(name: "Apple", type:"Fruit").save(flush:true)
-        Product p2 = new Product(name: "Orange", type:"Fruit").save(flush:true)
+        Product p1 = new Product(name: "Apple", type: "Fruit").save(flush: true)
+        Product p2 = new Product(name: "Orange", type: "Fruit").save(flush: true)
         ProductService productService = datastore.getService(ProductService)
 
         when:
@@ -159,8 +163,8 @@ class ServiceImplSpec extends Specification {
 
     void "test delete with void return type"() {
         given:
-        Product p1 = new Product(name: "Apple", type:"Fruit").save(flush:true)
-        Product p2 = new Product(name: "Orange", type:"Fruit").save(flush:true)
+        Product p1 = new Product(name: "Apple", type: "Fruit").save(flush: true)
+        Product p2 = new Product(name: "Orange", type: "Fruit").save(flush: true)
         ProductService productService = datastore.getService(ProductService)
 
         when:
@@ -209,7 +213,7 @@ class ServiceImplSpec extends Specification {
 
     void "test abstract class service impl"() {
         given:
-        AnotherProductService productService = (AnotherProductService)datastore.getService(AnotherProductInterface)
+        AnotherProductService productService = (AnotherProductService) datastore.getService(AnotherProductInterface)
 
         when:
         Product p = productService.saveProduct("Apple", "Fruit")
@@ -246,18 +250,18 @@ class ServiceImplSpec extends Specification {
         productService.find("Tomato", "Vegetable") == null
         productService.find("Tomato", "Fruit") != null
 
-        when:"An update is attempted with invalid parameters"
+        when: "An update is attempted with invalid parameters"
         product = productService.updateProduct(product.id, "")
 
-        then:"The errors are available on the object"
+        then: "The errors are available on the object"
         def e = thrown(ValidationException)
         e.errors != null
         e.errors.hasFieldErrors('type')
 
-        when:"An update is attempted on a non-existent object"
+        when: "An update is attempted on a non-existent object"
         product = productService.updateProduct(999, "blah")
 
-        then:"The result is null"
+        then: "The result is null"
         product == null
 
     }
@@ -346,7 +350,7 @@ class ServiceImplSpec extends Specification {
         productService.saveProduct("Tomato", "Fruit")
 
         ProductInfo info = productService.findProductInfo("Pumpkin", "Vegetable")
-        List<ProductInfo> infos = productService.findProductInfos( "Vegetable")
+        List<ProductInfo> infos = productService.findProductInfos("Vegetable")
 
         // groovy4 will include the generated methods in output of json, which recursively refer to themselves
         def result = new DefaultJsonGenerator(new JsonGenerator.Options().excludeFieldsByName("\$target")).toJson(info)
@@ -358,8 +362,8 @@ class ServiceImplSpec extends Specification {
         info.name == "Pumpkin"
         productService.searchProductInfoByName("Pump%") != null
         productService.findByTypeLike("Veg%") != null
-        productService.findByTypeLike("Jun%")  == null
-        productService.findAllByTypeLike( "Vege%").size() == 2
+        productService.findByTypeLike("Jun%") == null
+        productService.findAllByTypeLike("Vege%").size() == 2
 
         when:
         productService.searchProductInfo("Pum%").name == "Pumpkin"
@@ -383,11 +387,11 @@ class ServiceImplSpec extends Specification {
         new Product(name: "Pineapple", type: "Fruit")
                 .addToAttributes(name: 'Spikey')
                 .addToAttributes(name: 'Yellow')
-                .save(flush:true)
+                .save(flush: true)
         new Product(name: "Apple", type: "Fruit")
                 .addToAttributes(name: 'Round')
                 .addToAttributes(name: 'Green')
-                .save(flush:true)
+                .save(flush: true)
 
         expect:
         productService.findWithAttr('Spikey').name == 'Pineapple'
@@ -397,42 +401,46 @@ class ServiceImplSpec extends Specification {
 }
 
 interface ProductInfo {
+
     String getName()
 }
 
 @Entity
 class Product {
+
     String name
     String type
 
-    static hasMany = [attributes:Attribute]
+    static hasMany = [attributes: Attribute]
 
     static constraints = {
-        name blank:false
+        name blank: false
         type blank: false
     }
 }
 
 @Entity
 class Attribute {
+
     String name
 }
 
 interface AnotherProductInterface {
+
     Product saveProduct(String name, String type)
 
     Number delete(Serializable id)
 }
 
 @Service(Product)
-abstract class AnotherProductService implements AnotherProductInterface{
+abstract class AnotherProductService implements AnotherProductInterface {
 
     ProductService originalProductService
 
     abstract Product get(Serializable id)
 
     Product getByName(String name) {
-        return new Product(name:name.toUpperCase())
+        return new Product(name: name.toUpperCase())
     }
 
     ProductInfo findProductInfo(String name, String type) {
@@ -442,6 +450,7 @@ abstract class AnotherProductService implements AnotherProductInterface{
 
 @Service(Product)
 interface ProductService {
+
     List<ProductInfo> findProductInfos(String type)
 
     List<ProductInfo> findAllByTypeLike(String type)
@@ -498,6 +507,7 @@ interface ProductService {
 
     @Where({ type == type })
     Number deleteSomeProducts(String type)
+
     Product delete(String name)
 
     Number remove(Serializable id)
diff --git a/grails-datamapping-core-test/src/test/groovy/grails/gorm/services/multitenancy/database/Book.groovy b/grails-datamapping-core-test/src/test/groovy/grails/gorm/services/multitenancy/database/Book.groovy
index 7e81e6735e..e921f32f5f 100644
--- a/grails-datamapping-core-test/src/test/groovy/grails/gorm/services/multitenancy/database/Book.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/grails/gorm/services/multitenancy/database/Book.groovy
@@ -24,5 +24,6 @@ import grails.gorm.annotation.Entity
 
 @Entity
 class Book implements MultiTenant<Book> {
+
     String title
 }
diff --git a/grails-datamapping-core-test/src/test/groovy/grails/gorm/services/multitenancy/database/DatabasePerTenantSpec.groovy b/grails-datamapping-core-test/src/test/groovy/grails/gorm/services/multitenancy/database/DatabasePerTenantSpec.groovy
index 8c239fea93..ffd0576e87 100644
--- a/grails-datamapping-core-test/src/test/groovy/grails/gorm/services/multitenancy/database/DatabasePerTenantSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/grails/gorm/services/multitenancy/database/DatabasePerTenantSpec.groovy
@@ -18,6 +18,10 @@
  */
 package grails.gorm.services.multitenancy.database
 
+import spock.lang.AutoCleanup
+import spock.lang.Shared
+import spock.lang.Specification
+import spock.util.environment.RestoreSystemProperties
 
 import org.grails.datastore.mapping.config.Settings
 import org.grails.datastore.mapping.core.DatastoreUtils
@@ -26,12 +30,6 @@ import org.grails.datastore.mapping.multitenancy.MultiTenancySettings
 import org.grails.datastore.mapping.multitenancy.exceptions.TenantNotFoundException
 import org.grails.datastore.mapping.multitenancy.resolvers.SystemPropertyTenantResolver
 import org.grails.datastore.mapping.simple.SimpleMapDatastore
-import spock.lang.AutoCleanup
-import spock.lang.Ignore
-import spock.lang.IgnoreIf
-import spock.util.environment.RestoreSystemProperties
-import spock.lang.Shared
-import spock.lang.Specification
 
 /**
  * Created by graemerocher on 05/04/2017.
@@ -39,23 +37,26 @@ import spock.lang.Specification
 @RestoreSystemProperties
 class DatabasePerTenantSpec extends Specification {
 
-    @Shared @AutoCleanup SimpleMapDatastore datastore = new SimpleMapDatastore(
+    @Shared
+    @AutoCleanup
+    SimpleMapDatastore datastore = new SimpleMapDatastore(
             DatastoreUtils.createPropertyResolver([(Settings.SETTING_MULTI_TENANCY_MODE)   : MultiTenancySettings.MultiTenancyMode.DATABASE,
-             (Settings.SETTING_MULTI_TENANT_RESOLVER): new SystemPropertyTenantResolver(),
-             (Settings.SETTING_DB_CREATE)            : "create-drop"]),
+                                                   (Settings.SETTING_MULTI_TENANT_RESOLVER): new SystemPropertyTenantResolver(),
+                                                   (Settings.SETTING_DB_CREATE)            : "create-drop"]),
             [ConnectionSource.DEFAULT, "foo", "bar"],
             Book
     )
-    @Shared IBookService bookDataService = datastore.getService(IBookService)
+    @Shared
+    IBookService bookDataService = datastore.getService(IBookService)
 
     void 'Test database per tenant'() {
-        when:"When there is no tenant"
+        when: "When there is no tenant"
         Book.count()
 
-        then:"You still get an exception"
+        then: "You still get an exception"
         thrown(TenantNotFoundException)
 
-        when:"But look you can add a new Schema at runtime!"
+        when: "But look you can add a new Schema at runtime!"
 
         System.setProperty(SystemPropertyTenantResolver.PROPERTY_NAME, "foo")
 
@@ -63,24 +64,24 @@ class DatabasePerTenantSpec extends Specification {
 
         then:
         bookService.countBooks() == 0
-        bookDataService.countBooks()== 0
+        bookDataService.countBooks() == 0
 
-        when:"And the new @CurrentTenant transformation deals with the details for you!"
+        when: "And the new @CurrentTenant transformation deals with the details for you!"
         bookService.saveBook("The Stand")
         bookService.saveBook("The Shining")
         bookService.saveBook("It")
 
         then:
         bookService.countBooks() == 3
-        bookDataService.countBooks()== 3
+        bookDataService.countBooks() == 3
 
-        when:"Swapping to another schema and we get the right results!"
+        when: "Swapping to another schema and we get the right results!"
         System.setProperty(SystemPropertyTenantResolver.PROPERTY_NAME, "bar")
         bookService.saveBook("Along Came a Spider")
         bookDataService.saveBook("Whatever")
         then:
         bookService.countBooks() == 2
-        bookDataService.countBooks()== 2
+        bookDataService.countBooks() == 2
     }
 }
 
diff --git a/grails-datamapping-core-test/src/test/groovy/grails/gorm/services/multitenancy/partitioned/MultiTenantServiceTransformSpec.groovy b/grails-datamapping-core-test/src/test/groovy/grails/gorm/services/multitenancy/partitioned/MultiTenantServiceTransformSpec.groovy
index d9214e1874..d5b19601ba 100644
--- a/grails-datamapping-core-test/src/test/groovy/grails/gorm/services/multitenancy/partitioned/MultiTenantServiceTransformSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/grails/gorm/services/multitenancy/partitioned/MultiTenantServiceTransformSpec.groovy
@@ -18,19 +18,22 @@
  */
 package grails.gorm.services.multitenancy.partitioned
 
+import spock.lang.AutoCleanup
+import spock.lang.Shared
+import spock.lang.Specification
+import spock.util.environment.RestoreSystemProperties
+
 import org.grails.datastore.mapping.config.Settings
 import org.grails.datastore.mapping.multitenancy.MultiTenancySettings
 import org.grails.datastore.mapping.multitenancy.resolvers.SystemPropertyTenantResolver
 import org.grails.datastore.mapping.simple.SimpleMapDatastore
-import spock.lang.AutoCleanup
-import spock.util.environment.RestoreSystemProperties
-import spock.lang.Shared
-import spock.lang.Specification
 
 @RestoreSystemProperties
 class MultiTenantServiceTransformSpec extends Specification {
 
-    @Shared @AutoCleanup SimpleMapDatastore datastore = new SimpleMapDatastore(
+    @Shared
+    @AutoCleanup
+    SimpleMapDatastore datastore = new SimpleMapDatastore(
             [(Settings.SETTING_MULTI_TENANCY_MODE)   : MultiTenancySettings.MultiTenancyMode.DISCRIMINATOR,
              (Settings.SETTING_MULTI_TENANT_RESOLVER): new SystemPropertyTenantResolver(),
              (Settings.SETTING_DB_CREATE)            : "create-drop"
@@ -38,7 +41,8 @@ class MultiTenantServiceTransformSpec extends Specification {
             this.getClass().getPackage()
     )
 
-    @Shared def gcl
+    @Shared
+    def gcl
 
     void setupSpec() {
         gcl = new GroovyClassLoader()
diff --git a/grails-datamapping-core-test/src/test/groovy/grails/gorm/services/multitenancy/partitioned/PartitionMultiTenancySpec.groovy b/grails-datamapping-core-test/src/test/groovy/grails/gorm/services/multitenancy/partitioned/PartitionMultiTenancySpec.groovy
index 8943ded93a..9d9943e8f4 100644
--- a/grails-datamapping-core-test/src/test/groovy/grails/gorm/services/multitenancy/partitioned/PartitionMultiTenancySpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/grails/gorm/services/multitenancy/partitioned/PartitionMultiTenancySpec.groovy
@@ -18,6 +18,11 @@
  */
 package grails.gorm.services.multitenancy.partitioned
 
+import spock.lang.AutoCleanup
+import spock.lang.Shared
+import spock.lang.Specification
+import spock.util.environment.RestoreSystemProperties
+
 import grails.gorm.MultiTenant
 import grails.gorm.annotation.Entity
 import grails.gorm.multitenancy.CurrentTenant
@@ -30,21 +35,20 @@ import org.grails.datastore.mapping.multitenancy.MultiTenancySettings
 import org.grails.datastore.mapping.multitenancy.exceptions.TenantNotFoundException
 import org.grails.datastore.mapping.multitenancy.resolvers.SystemPropertyTenantResolver
 import org.grails.datastore.mapping.simple.SimpleMapDatastore
-import spock.lang.AutoCleanup
-import spock.util.environment.RestoreSystemProperties
-import spock.lang.Shared
-import spock.lang.Specification
 
 @RestoreSystemProperties
 class PartitionMultiTenancySpec extends Specification {
 
-    @Shared @AutoCleanup SimpleMapDatastore datastore = new SimpleMapDatastore(
+    @Shared
+    @AutoCleanup
+    SimpleMapDatastore datastore = new SimpleMapDatastore(
             [(Settings.SETTING_MULTI_TENANCY_MODE): MultiTenancySettings.MultiTenancyMode.DISCRIMINATOR,
              (Settings.SETTING_MULTI_TENANT_RESOLVER): new SystemPropertyTenantResolver(),
-             (Settings.SETTING_DB_CREATE): "create-drop"],
+             (Settings.SETTING_DB_CREATE)         : "create-drop"],
             getClass().getPackage()
     )
-    @Shared IBookService bookDataService = datastore.getService(IBookService)
+    @Shared
+    IBookService bookDataService = datastore.getService(IBookService)
 
     void 'Test partitioned multi-tenancy with GORM services'() {
         setup:
@@ -53,26 +57,26 @@ class PartitionMultiTenancySpec extends Specification {
         when: "When there is no tenant"
         Book.count()
 
-        then:"You still get an exception"
+        then: "You still get an exception"
         thrown(TenantNotFoundException)
 
-        when:"But look you can change tenant"
+        when: "But look you can change tenant"
         System.setProperty(SystemPropertyTenantResolver.PROPERTY_NAME, "12")
 
         then:
         bookService.countBooks() == 0
         bookDataService.countBooks() == 0
 
-        when:"And the new @CurrentTenant transformation deals with the details for you!"
+        when: "And the new @CurrentTenant transformation deals with the details for you!"
         bookService.saveBook("The Stand")
         bookService.saveBook("The Shining")
 
         then:
         bookService.countBooks() == 2
-        bookDataService.countBooks()== 2
+        bookDataService.countBooks() == 2
         bookService.findBooks("The Shining")[0].title == "The Shining"
 
-        when:"Swapping to another schema and we get the right results!"
+        when: "Swapping to another schema and we get the right results!"
         System.setProperty(SystemPropertyTenantResolver.PROPERTY_NAME, "13")
 
         then:
@@ -108,6 +112,7 @@ class PartitionMultiTenancySpec extends Specification {
 
 @Entity
 class Book implements MultiTenant<Book> {
+
     Long tenantId
     String title
 }
diff --git a/grails-datamapping-core-test/src/test/groovy/grails/gorm/services/multitenancy/schema/SchemaPerTenantSpec.groovy b/grails-datamapping-core-test/src/test/groovy/grails/gorm/services/multitenancy/schema/SchemaPerTenantSpec.groovy
index a59ec8ca1b..31fd4b7923 100644
--- a/grails-datamapping-core-test/src/test/groovy/grails/gorm/services/multitenancy/schema/SchemaPerTenantSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/grails/gorm/services/multitenancy/schema/SchemaPerTenantSpec.groovy
@@ -18,6 +18,11 @@
  */
 package grails.gorm.services.multitenancy.schema
 
+import spock.lang.AutoCleanup
+import spock.lang.Shared
+import spock.lang.Specification
+import spock.util.environment.RestoreSystemProperties
+
 import grails.gorm.MultiTenant
 import grails.gorm.annotation.Entity
 import grails.gorm.multitenancy.CurrentTenant
@@ -29,30 +34,29 @@ import org.grails.datastore.mapping.multitenancy.MultiTenancySettings
 import org.grails.datastore.mapping.multitenancy.exceptions.TenantNotFoundException
 import org.grails.datastore.mapping.multitenancy.resolvers.SystemPropertyTenantResolver
 import org.grails.datastore.mapping.simple.SimpleMapDatastore
-import spock.lang.AutoCleanup
-import spock.util.environment.RestoreSystemProperties
-import spock.lang.Shared
-import spock.lang.Specification
 
 @RestoreSystemProperties
 class SchemaPerTenantSpec extends Specification {
 
-    @Shared @AutoCleanup SimpleMapDatastore datastore = new SimpleMapDatastore(
+    @Shared
+    @AutoCleanup
+    SimpleMapDatastore datastore = new SimpleMapDatastore(
             [(Settings.SETTING_MULTI_TENANCY_MODE): MultiTenancySettings.MultiTenancyMode.SCHEMA,
              (Settings.SETTING_MULTI_TENANT_RESOLVER): new SystemPropertyTenantResolver(),
-             (Settings.SETTING_DB_CREATE): "create-drop"],
+             (Settings.SETTING_DB_CREATE)         : "create-drop"],
             getClass().getPackage()
     )
-    @Shared IBookService bookDataService = datastore.getService(IBookService)
+    @Shared
+    IBookService bookDataService = datastore.getService(IBookService)
 
     void 'Test schema per tenant'() {
-        when:"When there is no tenant"
+        when: "When there is no tenant"
         Book.count()
 
-        then:"You still get an exception"
+        then: "You still get an exception"
         thrown(TenantNotFoundException)
 
-        when:"But look you can add a new Schema at runtime!"
+        when: "But look you can add a new Schema at runtime!"
         datastore.addTenantForSchema('foo')
         System.setProperty(SystemPropertyTenantResolver.PROPERTY_NAME, "foo")
 
@@ -60,27 +64,28 @@ class SchemaPerTenantSpec extends Specification {
 
         then:
         bookService.countBooks() == 0
-        bookDataService.countBooks()== 0
+        bookDataService.countBooks() == 0
 
-        when:"And the new @CurrentTenant transformation deals with the details for you!"
+        when: "And the new @CurrentTenant transformation deals with the details for you!"
         bookService.saveBook("The Stand")
 
         then:
         bookService.countBooks() == 1
-        bookDataService.countBooks()== 1
+        bookDataService.countBooks() == 1
 
-        when:"Swapping to another schema and we get the right results!"
+        when: "Swapping to another schema and we get the right results!"
         datastore.addTenantForSchema('bar')
         System.setProperty(SystemPropertyTenantResolver.PROPERTY_NAME, "bar")
 
         then:
         bookService.countBooks() == 0
-        bookDataService.countBooks()== 0
+        bookDataService.countBooks() == 0
     }
 }
 
 @Entity
 class Book implements MultiTenant<Book> {
+
     String title
 }
 
@@ -89,7 +94,7 @@ class Book implements MultiTenant<Book> {
 class BookService {
 
     void saveBook(String title) {
-        new Book(title:"The Stand").save()
+        new Book(title: "The Stand").save()
     }
 
     @ReadOnly
diff --git a/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/AbstractNonGormParentClassSpec.groovy b/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/AbstractNonGormParentClassSpec.groovy
index 8fc72e11a1..afee30f906 100644
--- a/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/AbstractNonGormParentClassSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/AbstractNonGormParentClassSpec.groovy
@@ -39,10 +39,12 @@ class AbstractNonGormParentClassSpec extends GrailsDataTckSpec {
 }
 
 abstract class Common {
+
     String foo
 }
 
 @Entity
 class ConcreteFoo extends Common {
+
     String bar
 }
diff --git a/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/CircularCascadeSpec.groovy b/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/CircularCascadeSpec.groovy
index eab4e7de04..01dbf107c4 100644
--- a/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/CircularCascadeSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/CircularCascadeSpec.groovy
@@ -18,6 +18,10 @@
  */
 package grails.gorm.specs
 
+import spock.lang.Issue
+
+import org.springframework.context.MessageSource
+
 import grails.gorm.annotation.Entity
 import grails.gorm.validation.PersistentEntityValidator
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
@@ -25,14 +29,13 @@ import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
 import org.grails.datastore.gorm.validation.constraints.eval.DefaultConstraintEvaluator
 import org.grails.datastore.gorm.validation.constraints.registry.DefaultConstraintRegistry
 import org.grails.datastore.mapping.model.PersistentEntity
-import org.springframework.context.MessageSource
-import spock.lang.Issue
 
 /**
  * @author Graeme Rocher
  * @since 1.0
  */
 class CircularCascadeSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([SchoolPerson, ActivityValidate, SportValidate, TeamValidate, ArenaValidate])
     }
@@ -94,6 +97,7 @@ class CircularCascadeSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
 
 @Entity
 class SchoolPerson {
+
     String name
 
     static belongsTo = [master: SchoolPerson]
@@ -111,6 +115,7 @@ class SchoolPerson {
 
 @Entity
 class ActivityValidate {
+
     String name
 
     static hasMany = [sports: SportValidate]
@@ -118,6 +123,7 @@ class ActivityValidate {
 
 @Entity
 class SportValidate {
+
     String name
 
     static hasMany = [teams: TeamValidate, arenas: ArenaValidate]
@@ -125,10 +131,12 @@ class SportValidate {
 
 @Entity
 class TeamValidate {
+
     String name
 }
 
 @Entity
 class ArenaValidate {
+
     String name
 }
\ No newline at end of file
diff --git a/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/CurrentTenantTransformSpec.groovy b/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/CurrentTenantTransformSpec.groovy
index 4c590f142f..dda173aed4 100644
--- a/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/CurrentTenantTransformSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/CurrentTenantTransformSpec.groovy
@@ -18,6 +18,13 @@
  */
 package grails.gorm.specs
 
+import spock.lang.AutoCleanup
+import spock.lang.Shared
+import spock.lang.Specification
+import spock.util.environment.RestoreSystemProperties
+
+import org.springframework.transaction.TransactionStatus
+
 import grails.gorm.multitenancy.CurrentTenant
 import grails.gorm.multitenancy.Tenant
 import grails.gorm.multitenancy.Tenants
@@ -31,24 +38,21 @@ import org.grails.datastore.mapping.multitenancy.MultiTenancySettings
 import org.grails.datastore.mapping.multitenancy.exceptions.TenantNotFoundException
 import org.grails.datastore.mapping.multitenancy.resolvers.SystemPropertyTenantResolver
 import org.grails.datastore.mapping.simple.SimpleMapDatastore
-import org.springframework.transaction.TransactionStatus
-import spock.lang.AutoCleanup
-import spock.util.environment.RestoreSystemProperties
-import spock.lang.Shared
-import spock.lang.Specification
 
 /**
  * Created by graemerocher on 16/01/2017.
  */
 @RestoreSystemProperties
-class CurrentTenantTransformSpec  extends Specification {
+class CurrentTenantTransformSpec extends Specification {
 
-    @Shared @AutoCleanup SimpleMapDatastore datastore = new SimpleMapDatastore(
+    @Shared
+    @AutoCleanup
+    SimpleMapDatastore datastore = new SimpleMapDatastore(
             DatastoreUtils.createPropertyResolver(
                     (Settings.SETTING_MULTI_TENANCY_MODE): MultiTenancySettings.MultiTenancyMode.DATABASE,
                     (Settings.SETTING_MULTI_TENANT_RESOLVER): new SystemPropertyTenantResolver()
             ),
-            [ConnectionSource.DEFAULT, 'one','two'],
+            [ConnectionSource.DEFAULT, 'one', 'two'],
             Team,
             Player
     )
@@ -111,76 +115,77 @@ return TestService
         expect:
         testServiceClass.getDeclaredMethod('$tt__addTeam', String, TransactionStatus)
         testServiceClass.getDeclaredMethod('$mt__addTeam', String, Serializable)
-        testServiceClass.getDeclaredMethod('$mt__listTwoTeams',  Serializable)
+        testServiceClass.getDeclaredMethod('$mt__listTwoTeams', Serializable)
 
     }
 
     void "Test @CurrentTenant with service"() {
-        given:"A service with @CurrentTenant at the class level is used"
+        given: "A service with @CurrentTenant at the class level is used"
         TeamService teamService = new TeamService()
 
-        when:"a method is invoked"
+        when: "a method is invoked"
         def results = teamService.listTeams()
 
-        then:"An exception is thrown because no tenant is present"
+        then: "An exception is thrown because no tenant is present"
         thrown(TenantNotFoundException)
 
-        when:"An @Transactional method is invoked"
+        when: "An @Transactional method is invoked"
         teamService.addTeam("test")
 
-        then:"An exception is thrown because no tenant is present"
+        then: "An exception is thrown because no tenant is present"
         thrown(TenantNotFoundException)
 
-        when:"An @Transactional method is invoked which has no GORM logic in it"
+        when: "An @Transactional method is invoked which has no GORM logic in it"
         teamService.addTeamCheckTransaction("test")
 
-        then:"An exception is thrown because no tenant is present"
+        then: "An exception is thrown because no tenant is present"
         thrown(TenantNotFoundException)
 
-        when:"A method that uses @Tenant is used"
+        when: "A method that uses @Tenant is used"
         results = teamService.allTwoTeams()
 
-        then:"A tenant id was resolved for that method"
+        then: "A tenant id was resolved for that method"
         results.isEmpty()
 
-        when:"A tenant is set"
+        when: "A tenant is set"
         System.setProperty(SystemPropertyTenantResolver.PROPERTY_NAME, "two")
         results = teamService.listTeams()
 
-        then:"The result is correct"
+        then: "The result is correct"
         results.size() == 0
 
-        when:"A @Transactional method is invoked"
+        when: "A @Transactional method is invoked"
         teamService.addTeam("test")
         teamService.addTeamCheckTransaction("test")
         results = teamService.listTeams()
 
-        then:"The results are correct"
+        then: "The results are correct"
         results.size() == 1
 
-        when:"we try with no tenant"
+        when: "we try with no tenant"
         System.setProperty(SystemPropertyTenantResolver.PROPERTY_NAME, "")
         teamService.addTeam("test 2")
 
-        then:"An exception is thrown"
+        then: "An exception is thrown"
         thrown(TenantNotFoundException)
 
-        when:"A method that uses @Tenant is used"
+        when: "A method that uses @Tenant is used"
         results = teamService.allTwoTeams()
 
-        then:"A tenant id was resolved for that method"
+        then: "A tenant id was resolved for that method"
         results.size() == 1
 
-        when:"A method that used @WithoutTenant is used"
+        when: "A method that used @WithoutTenant is used"
         int playerCount = teamService.countPlayers()
 
-        then:"It executed corretly without throwing an exception"
+        then: "It executed corretly without throwing an exception"
         playerCount == 0
     }
 }
 
 @WithoutTenant
 class PlayService {
+
     int countPlays() {
         return 10;
     }
@@ -195,18 +200,18 @@ class TeamService {
         Player.count()
     }
 
-    @Tenant({"two"})
+    @Tenant({ "two" })
     List<Team> allTwoTeams() {
         Team.list()
     }
 
     List<Team> listTeams() {
-        Team.list(max:10)
+        Team.list(max: 10)
     }
 
     @Transactional
     void addTeam(String name) {
-        new Team(name:name).save(flush:true)
+        new Team(name: name).save(flush: true)
     }
 
     @Transactional
diff --git a/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/DeepValidateWithSaveSpec.groovy b/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/DeepValidateWithSaveSpec.groovy
index 6401389772..72e8f508cc 100644
--- a/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/DeepValidateWithSaveSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/DeepValidateWithSaveSpec.groovy
@@ -18,10 +18,10 @@
  */
 package grails.gorm.specs
 
+import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
 import org.apache.grails.data.testing.tck.domains.ChildEntity
 import org.apache.grails.data.testing.tck.domains.TestEntity
-import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.grails.datastore.gorm.validation.CascadingValidator
 
 class DeepValidateWithSaveSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
diff --git a/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/DetachedCriteriaAssociationQuerySpec.groovy b/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/DetachedCriteriaAssociationQuerySpec.groovy
index edbe6e2687..9bd5047875 100644
--- a/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/DetachedCriteriaAssociationQuerySpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/DetachedCriteriaAssociationQuerySpec.groovy
@@ -18,18 +18,20 @@
  */
 package grails.gorm.specs
 
+import spock.lang.Issue
+
 import grails.gorm.DetachedCriteria
 import grails.gorm.annotation.Entity
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
 import org.grails.datastore.gorm.query.criteria.DetachedAssociationCriteria
 import org.grails.datastore.mapping.query.Query
-import spock.lang.Issue
 
 /**
  * Created by graemerocher on 02/11/16.
  */
 class DetachedCriteriaAssociationQuerySpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([BookA, Genre])
     }
@@ -65,10 +67,12 @@ class DetachedCriteriaAssociationQuerySpec extends GrailsDataTckSpec<GrailsDataC
 
 @Entity
 class BookA {
+
     Genre genre
 }
 
 @Entity
 class Genre {
+
     String description
 }
\ No newline at end of file
diff --git a/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/JpaQueryBuilderSpec.groovy b/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/JpaQueryBuilderSpec.groovy
index e3ca77467b..5bdb137d4d 100644
--- a/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/JpaQueryBuilderSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/JpaQueryBuilderSpec.groovy
@@ -18,12 +18,13 @@
  */
 package grails.gorm.specs
 
+import org.springframework.dao.InvalidDataAccessResourceUsageException
+
 import grails.gorm.DetachedCriteria
-import org.apache.grails.data.testing.tck.domains.Person
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
+import org.apache.grails.data.testing.tck.domains.Person
 import org.grails.datastore.mapping.query.jpa.JpaQueryBuilder
-import org.springframework.dao.InvalidDataAccessResourceUsageException
 
 /**
  * Test for JPA builder
diff --git a/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/MultipleDataSourceSpec.groovy b/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/MultipleDataSourceSpec.groovy
index fa090f9007..d61a2e2ac6 100644
--- a/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/MultipleDataSourceSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/MultipleDataSourceSpec.groovy
@@ -43,7 +43,7 @@ class MultipleDataSourceSpec extends Specification {
         def service = new PlayerService()
         def dataService = datastore.getService(IPlayerService)
         dataService.savePlayer('Neville')
-        
+
         expect:
         Player.count() == 2
         new DetachedCriteria<>(Player).count() == 2
@@ -118,6 +118,8 @@ class PlayerService {
 interface IPlayerService {
 
     Number countPlayers()
+
     Player savePlayer(String name)
+
     void deletePlayer(String name)
 }
\ No newline at end of file
diff --git a/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/ReadOnlyCriteriaSpec.groovy b/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/ReadOnlyCriteriaSpec.groovy
index 07aebd373c..26560a6270 100644
--- a/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/ReadOnlyCriteriaSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/ReadOnlyCriteriaSpec.groovy
@@ -18,10 +18,11 @@
  */
 package grails.gorm.specs
 
+import spock.lang.Issue
+
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
 import org.apache.grails.data.testing.tck.domains.TestEntity
-import spock.lang.Issue
 
 class ReadOnlyCriteriaSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
 
diff --git a/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/SingleCharPropertySpec.groovy b/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/SingleCharPropertySpec.groovy
index 5b4190637e..2a17d53352 100644
--- a/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/SingleCharPropertySpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/SingleCharPropertySpec.groovy
@@ -19,14 +19,16 @@
 package grails.gorm.specs
 
 import org.codehaus.groovy.ast.ClassNode
+
 import spock.lang.Specification
 
 /**
  * Created by graemerocher on 25/08/2016.
  */
 class SingleCharPropertySpec extends Specification {
+
     void "Test parse GORM entity with single char properties"() {
-        when:"A gorm entity is parsed"
+        when: "A gorm entity is parsed"
         def cls = new GroovyClassLoader().parseClass('''
 import grails.gorm.annotation.Entity
 
@@ -46,7 +48,7 @@ class PersonLink {
     }
 }
 ''')
-        then:"It is a valid class"
+        then: "It is a valid class"
         new ClassNode(cls).methods
     }
 }
diff --git a/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/SingleResultSpec.groovy b/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/SingleResultSpec.groovy
index 9f819726a3..94469c43de 100644
--- a/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/SingleResultSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/SingleResultSpec.groovy
@@ -18,11 +18,11 @@
  */
 package grails.gorm.specs
 
-import org.apache.grails.data.testing.tck.domains.Person
-import org.apache.grails.data.testing.tck.domains.TestEntity
+import spock.lang.Issue
+
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
-import spock.lang.Issue
+import org.apache.grails.data.testing.tck.domains.TestEntity
 
 /**
  * Created by graemerocher on 16/02/2017.
diff --git a/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/SubquerySpec.groovy b/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/SubquerySpec.groovy
index 135ab9d34f..378e58f38e 100644
--- a/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/SubquerySpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/SubquerySpec.groovy
@@ -19,9 +19,9 @@
 package grails.gorm.specs
 
 import grails.gorm.DetachedCriteria
-import org.apache.grails.data.testing.tck.domains.Person
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
+import org.apache.grails.data.testing.tck.domains.Person
 
 /**
  * Tests for using subqueries in criteria and where method calls
diff --git a/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/TenantServiceSpec.groovy b/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/TenantServiceSpec.groovy
index 0c3c925647..5322e28986 100644
--- a/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/TenantServiceSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/TenantServiceSpec.groovy
@@ -18,6 +18,11 @@
  */
 package grails.gorm.specs
 
+import spock.lang.AutoCleanup
+import spock.lang.Shared
+import spock.lang.Specification
+import spock.util.environment.RestoreSystemProperties
+
 import grails.gorm.MultiTenant
 import grails.gorm.annotation.Entity
 import grails.gorm.multitenancy.TenantService
@@ -28,10 +33,6 @@ import org.grails.datastore.mapping.multitenancy.MultiTenancySettings
 import org.grails.datastore.mapping.multitenancy.exceptions.TenantNotFoundException
 import org.grails.datastore.mapping.multitenancy.resolvers.SystemPropertyTenantResolver
 import org.grails.datastore.mapping.simple.SimpleMapDatastore
-import spock.lang.AutoCleanup
-import spock.util.environment.RestoreSystemProperties
-import spock.lang.Shared
-import spock.lang.Specification
 
 /**
  * Created by graemerocher on 11/01/2017.
@@ -39,7 +40,9 @@ import spock.lang.Specification
 @RestoreSystemProperties
 class TenantServiceSpec extends Specification {
 
-    @Shared @AutoCleanup SimpleMapDatastore datastore = new SimpleMapDatastore(
+    @Shared
+    @AutoCleanup
+    SimpleMapDatastore datastore = new SimpleMapDatastore(
             DatastoreUtils.createPropertyResolver(
                     (Settings.SETTING_MULTI_TENANCY_MODE): MultiTenancySettings.MultiTenancyMode.DATABASE,
                     (Settings.SETTING_MULTI_TENANT_RESOLVER): new SystemPropertyTenantResolver()
@@ -58,7 +61,7 @@ class TenantServiceSpec extends Specification {
         when:
         TenantService tenantService = datastore.getService(TenantService)
         def twoCount = tenantService.withId("two") {
-            new Team(name: "Arsenal").save(flush:true)
+            new Team(name: "Arsenal").save(flush: true)
             Team.count()
         }
         def defaultCount = tenantService.withId(ConnectionSource.DEFAULT) { Team.count() }
@@ -69,9 +72,9 @@ class TenantServiceSpec extends Specification {
         defaultCount == 0
         thrown TenantNotFoundException
 
-        when:"The current tenant is set"
+        when: "The current tenant is set"
         System.setProperty(SystemPropertyTenantResolver.PROPERTY_NAME, "two")
-        new Team(name: "Chelsea").save(flush:true)
+        new Team(name: "Chelsea").save(flush: true)
         twoCount == Team.count()
         defaultCount = tenantService.withoutId {
             Team.count()
@@ -85,9 +88,9 @@ class TenantServiceSpec extends Specification {
         Team.count() == 2
 
 
-        when:"The current tenant is set"
+        when: "The current tenant is set"
         System.setProperty(SystemPropertyTenantResolver.PROPERTY_NAME, ConnectionSource.DEFAULT)
-        new Team(name: "Manchester United").save(flush:true)
+        new Team(name: "Manchester United").save(flush: true)
 
 
         then:
@@ -101,6 +104,7 @@ class TenantServiceSpec extends Specification {
 
 @Entity
 class Team implements MultiTenant<Team> {
+
     String name
 }
 
diff --git a/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/TransactionServiceSpec.groovy b/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/TransactionServiceSpec.groovy
index 9cc386da96..77dd8a0181 100644
--- a/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/TransactionServiceSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/TransactionServiceSpec.groovy
@@ -18,36 +18,40 @@
  */
 package grails.gorm.specs
 
-import grails.gorm.transactions.TransactionService
-import org.grails.datastore.mapping.simple.SimpleMapDatastore
-import org.springframework.transaction.TransactionStatus
 import spock.lang.AutoCleanup
 import spock.lang.Shared
 import spock.lang.Specification
 
+import org.springframework.transaction.TransactionStatus
+
+import grails.gorm.transactions.TransactionService
+import org.grails.datastore.mapping.simple.SimpleMapDatastore
+
 /**
  * Created by graemerocher on 11/01/2017.
  */
 class TransactionServiceSpec extends Specification {
 
-    @Shared @AutoCleanup SimpleMapDatastore datastore = new SimpleMapDatastore()
+    @Shared
+    @AutoCleanup
+    SimpleMapDatastore datastore = new SimpleMapDatastore()
 
     void "test use transaction service"() {
-        when:"the tx service is retrieved"
+        when: "the tx service is retrieved"
         TransactionService txService = datastore.getService(TransactionService)
         TransactionStatus status = txService.withTransaction { TransactionStatus status -> status }
 
-        then:"The transaction status is correct"
+        then: "The transaction status is correct"
         status.completed
         status.isNewTransaction()
         !status.isRollbackOnly()
 
-        when:"rollback is used"
+        when: "rollback is used"
         status = txService.withRollback { TransactionStatus ts ->
             ts
         }
 
-        then:"The transaction was rolled back"
+        then: "The transaction was rolled back"
         status.completed
         status.isRollbackOnly()
     }
diff --git a/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/TransactionalTransformOnServiceSpec.groovy b/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/TransactionalTransformOnServiceSpec.groovy
index 0f5550be31..7796835fab 100644
--- a/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/TransactionalTransformOnServiceSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/TransactionalTransformOnServiceSpec.groovy
@@ -18,15 +18,16 @@
  */
 package grails.gorm.specs
 
-import org.apache.grails.data.testing.tck.domains.Person
 import grails.gorm.transactions.Transactional
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
+import org.apache.grails.data.testing.tck.domains.Person
 
 /**
  * Created by graemerocher on 05/01/2017.
  */
 class TransactionalTransformOnServiceSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([Person])
     }
@@ -39,6 +40,7 @@ class TransactionalTransformOnServiceSpec extends GrailsDataTckSpec<GrailsDataCo
 
 
 }
+
 @Transactional
 class TestService {
 
@@ -46,6 +48,7 @@ class TestService {
         return transactionStatus != null
     }
 }
+
 abstract class ParentService {
 
     @Transactional
@@ -53,6 +56,7 @@ abstract class ParentService {
         "parent $arg"
     }
 }
+
 class ChildService extends ParentService {
 
 
diff --git a/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/WhereMethodEmbeddedInAssociationSpec.groovy b/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/WhereMethodEmbeddedInAssociationSpec.groovy
index 20ccebafee..0f342c8435 100644
--- a/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/WhereMethodEmbeddedInAssociationSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/WhereMethodEmbeddedInAssociationSpec.groovy
@@ -18,14 +18,16 @@
  */
 package grails.gorm.specs
 
+import spock.lang.Shared
+
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
 import org.grails.datastore.gorm.query.transform.ApplyDetachedCriteriaTransform
 import org.grails.datastore.mapping.reflect.FieldEntityAccess
-import spock.lang.Shared
 
 @ApplyDetachedCriteriaTransform
 class WhereMethodEmbeddedInAssociationSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     @Shared
     def gcl
 
diff --git a/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/WhereMethodSpec.groovy b/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/WhereMethodSpec.groovy
index 118a52d5a1..5039acb9f4 100644
--- a/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/WhereMethodSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/grails/gorm/specs/WhereMethodSpec.groovy
@@ -18,27 +18,30 @@
  */
 package grails.gorm.specs
 
+import groovy.transform.CompileStatic
+import org.codehaus.groovy.control.MultipleCompilationErrorsException
+
+import spock.lang.Issue
+import spock.lang.Shared
+
 import grails.gorm.DetachedCriteria
+import grails.persistence.Entity
+import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
+import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
 import org.apache.grails.data.testing.tck.domains.Country
 import org.apache.grails.data.testing.tck.domains.Face
 import org.apache.grails.data.testing.tck.domains.Nose
-import org.apache.grails.data.testing.tck.domains.Pet
-import grails.persistence.Entity
-import groovy.transform.CompileStatic
 import org.apache.grails.data.testing.tck.domains.Person
-import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
-import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
-import org.codehaus.groovy.control.MultipleCompilationErrorsException
+import org.apache.grails.data.testing.tck.domains.Pet
 import org.grails.datastore.gorm.query.transform.ApplyDetachedCriteriaTransform
 import org.grails.datastore.mapping.reflect.FieldEntityAccess
-import spock.lang.Issue
-import spock.lang.Shared
 
 /**
  * Tests for the new where method used to define detached criteria using the new DSL
  */
 @ApplyDetachedCriteriaTransform
 class WhereMethodSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     @Shared
     def gcl
 
@@ -1549,6 +1552,7 @@ class Project {
     //@CompileStatic
     @ApplyDetachedCriteriaTransform
     static class DetachedCriteriaInnerClass {
+
         static Person findHomerWithWhereAndCompileStatic() {
             List<Person> results = Person.where { lastName == 'Simpson' }.list(max: 2)
             results[0]
@@ -1974,6 +1978,7 @@ class CallMe {
 
 @Entity
 class Continent {
+
     Long id
     Long version
 
@@ -1984,6 +1989,7 @@ class Continent {
 
 @Entity
 class Group {
+
     Long id
     String name
     SortedSet<Person> people = [] as SortedSet
@@ -1992,6 +1998,7 @@ class Group {
 
 @Entity
 class Proposal {
+
     Long id
     String name
     Advisor advisor
@@ -2006,6 +2013,7 @@ class Proposal {
 
 @Entity
 class Advisor {
+
     Long id
     String username
 
diff --git a/grails-datamapping-core-test/src/test/groovy/org/apache/grails/data/simple/core/GrailsDataCoreTckManager.groovy b/grails-datamapping-core-test/src/test/groovy/org/apache/grails/data/simple/core/GrailsDataCoreTckManager.groovy
index d3ac1b1ef6..0ae99246a9 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/apache/grails/data/simple/core/GrailsDataCoreTckManager.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/apache/grails/data/simple/core/GrailsDataCoreTckManager.groovy
@@ -20,6 +20,11 @@
  */
 package org.apache.grails.data.simple.core
 
+import org.springframework.context.support.GenericApplicationContext
+import org.springframework.util.StringUtils
+import org.springframework.validation.Errors
+import org.springframework.validation.Validator
+
 import org.apache.grails.data.testing.tck.base.GrailsDataTckManager
 import org.grails.datastore.gorm.Birthday
 import org.grails.datastore.mapping.core.Session
@@ -31,10 +36,6 @@ import org.grails.datastore.mapping.query.Query.PropertyCriterion
 import org.grails.datastore.mapping.simple.SimpleMapDatastore
 import org.grails.datastore.mapping.simple.query.SimpleMapQuery
 import org.grails.datastore.mapping.simple.query.SimpleMapResultList
-import org.springframework.context.support.GenericApplicationContext
-import org.springframework.util.StringUtils
-import org.springframework.validation.Errors
-import org.springframework.validation.Validator
 
 /**
  * @author graemerocher
@@ -48,6 +49,7 @@ class GrailsDataCoreTckManager extends GrailsDataTckManager {
         def simple = new SimpleMapDatastore(ctx)
 
         simple.mappingContext.mappingFactory.registerCustomType(new AbstractMappingAwareCustomTypeMarshaller<Birthday, Map, SimpleMapResultList>(Birthday) {
+
             @Override
             protected Object writeInternal(PersistentProperty property, String key, Birthday value, Map nativeTarget) {
                 if (value == null) {
@@ -68,8 +70,7 @@ class GrailsDataCoreTckManager extends GrailsDataTckManager {
                     criterion.from = criterion.from.date.time
                     criterion.to = criterion.to.date.time
                     nativeQuery.results << handler?.call(criterion, property) ?: []
-                }
-                else {
+                } else {
                     criterion.value = criterion.value.date.time
                     nativeQuery.results << handler?.call(criterion, property) ?: []
                 }
@@ -89,7 +90,8 @@ class GrailsDataCoreTckManager extends GrailsDataTckManager {
         }
 
         PersistentEntity entity = simple.mappingContext.persistentEntities.find {
-            PersistentEntity e -> e.name.contains("TestEntity")}
+            PersistentEntity e -> e.name.contains("TestEntity")
+        }
 
         simple.mappingContext.addEntityValidator(entity, [
                 supports: { Class c -> true },
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/AddToAndInjectedServiceSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/AddToAndInjectedServiceSpec.groovy
index c9cd96f6a5..fb5ecdcc0b 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/AddToAndInjectedServiceSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/AddToAndInjectedServiceSpec.groovy
@@ -18,10 +18,11 @@
  */
 package org.grails.datastore.gorm
 
+import spock.lang.Issue
+
 import grails.persistence.Entity
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
-import spock.lang.Issue
 
 class AddToAndInjectedServiceSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
 
@@ -31,19 +32,20 @@ class AddToAndInjectedServiceSpec extends GrailsDataTckSpec<GrailsDataCoreTckMan
 
     @Issue('GRAILS-9119')
     void "Test add to method with injected service present"() {
-        given:"A domain with an addTo relationship"
-            def pirate = new Pirate(name: 'Billy')
-            def ship = new Ship()
-        when:"The addTo method is called"
-            ship.addToPirates(pirate)
-
-        then:"It adds an associated entity correctly"
-            assert 1 == ship.pirates.size()
+        given: "A domain with an addTo relationship"
+        def pirate = new Pirate(name: 'Billy')
+        def ship = new Ship()
+        when: "The addTo method is called"
+        ship.addToPirates(pirate)
+
+        then: "It adds an associated entity correctly"
+        assert 1 == ship.pirates.size()
     }
 }
 
 @Entity
 class Pirate {
+
     Long id
     String name
     def pirateShipService
@@ -51,6 +53,7 @@ class Pirate {
 
 @Entity
 class Ship {
+
     Long id
     Set pirates
     static hasMany = [pirates: Pirate]
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/AddToMethodWithBasicCollectionSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/AddToMethodWithBasicCollectionSpec.groovy
index 0dcd2093f1..0468e3e1d6 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/AddToMethodWithBasicCollectionSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/AddToMethodWithBasicCollectionSpec.groovy
@@ -18,10 +18,11 @@
  */
 package org.grails.datastore.gorm
 
+import spock.lang.Issue
+
 import grails.persistence.Entity
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
-import spock.lang.Issue
 
 class AddToMethodWithBasicCollectionSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
 
@@ -31,20 +32,20 @@ class AddToMethodWithBasicCollectionSpec extends GrailsDataTckSpec<GrailsDataCor
 
     @Issue('GRAILS-8779')
     void "Test that the addTo* method works with basic collections"() {
-         when:"A book is saved with a basic collection"
-            def book = new BasicBook(title: "DGG")
-            book.addToAuthors("Graeme")
+        when: "A book is saved with a basic collection"
+        def book = new BasicBook(title: "DGG")
+        book.addToAuthors("Graeme")
                 .addToAuthors("Jeff")
-                .save(flush:true)
+                .save(flush: true)
 
-         manager.session.clear()
+        manager.session.clear()
 
-            book = BasicBook.get(book.id)
-        then:"The model is saved correctly"
-            book.title == "DGG"
-            book.authors.size() == 2
-            book.authors.contains "Graeme"
-            book.authors.contains "Jeff"
+        book = BasicBook.get(book.id)
+        then: "The model is saved correctly"
+        book.title == "DGG"
+        book.authors.size() == 2
+        book.authors.contains "Graeme"
+        book.authors.contains "Jeff"
     }
 }
 
@@ -52,7 +53,7 @@ class AddToMethodWithBasicCollectionSpec extends GrailsDataTckSpec<GrailsDataCor
 class BasicBook {
 
     Long id
-    static hasMany = [authors:String]
+    static hasMany = [authors: String]
 
     Set<String> authors
     String title
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/AddToMethodWithEmbeddedCollectionSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/AddToMethodWithEmbeddedCollectionSpec.groovy
index 7cc0392659..20727311da 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/AddToMethodWithEmbeddedCollectionSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/AddToMethodWithEmbeddedCollectionSpec.groovy
@@ -66,6 +66,7 @@ class Library {
 
 @Entity
 class LibraryBook {
+
     Long id
     String title
     String author
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/AssignedIdentifierSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/AssignedIdentifierSpec.groovy
index ada3cb2e73..4a0a8cb996 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/AssignedIdentifierSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/AssignedIdentifierSpec.groovy
@@ -21,6 +21,7 @@ package org.grails.datastore.gorm
 import grails.persistence.Entity
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
+
 /**
  * Tests for usage of assigned identifiers
  */
@@ -64,6 +65,7 @@ class AssignedIdentifierSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager>
 
 @Entity
 class River {
+
     String name
     String country
     static mapping = {
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/AsyncReadMethodsSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/AsyncReadMethodsSpec.groovy
index 97e3ebb5fd..0aebc025ca 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/AsyncReadMethodsSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/AsyncReadMethodsSpec.groovy
@@ -20,9 +20,9 @@ package org.grails.datastore.gorm
 
 import grails.async.Promise
 import grails.async.Promises
-import org.apache.grails.data.testing.tck.domains.Person
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
+import org.apache.grails.data.testing.tck.domains.Person
 
 /**
  */
@@ -63,7 +63,7 @@ class AsyncReadMethodsSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
         then: "A promise is returned"
         promise instanceof Promise
 
-        when: "The promise value is returned"
+                when : "The promise value is returned"
         def results = promise.get()
 
         then: "They are correct"
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/AutoLinkOneToManyAssociationSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/AutoLinkOneToManyAssociationSpec.groovy
index 2209794dbb..4c6e7ffb56 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/AutoLinkOneToManyAssociationSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/AutoLinkOneToManyAssociationSpec.groovy
@@ -18,12 +18,14 @@
  */
 package org.grails.datastore.gorm
 
+import spock.lang.Issue
+
 import grails.persistence.Entity
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
-import spock.lang.Issue
 
 class AutoLinkOneToManyAssociationSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([AutoLinkListAuthor, AutoLinkListBook])
     }
@@ -55,6 +57,7 @@ class AutoLinkOneToManyAssociationSpec extends GrailsDataTckSpec<GrailsDataCoreT
 
 @Entity
 class AutoLinkListAuthor {
+
     Long id
     String firstName
     String lastName
@@ -67,6 +70,7 @@ class AutoLinkListAuthor {
 
 @Entity
 class AutoLinkListBook {
+
     Long id
     String title
     Date published
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/BasicTypeHasManySpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/BasicTypeHasManySpec.groovy
index e62b82c39e..017c86fabe 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/BasicTypeHasManySpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/BasicTypeHasManySpec.groovy
@@ -18,15 +18,17 @@
  */
 package org.grails.datastore.gorm
 
+import spock.lang.Issue
+
 import grails.persistence.Entity
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
-import spock.lang.Issue
 
 /**
  * @author Graeme Rocher
  */
 class BasicTypeHasManySpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([Workspace])
     }
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/BeforeUpdateEventSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/BeforeUpdateEventSpec.groovy
index 5a1f77c058..63b9450706 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/BeforeUpdateEventSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/BeforeUpdateEventSpec.groovy
@@ -18,12 +18,14 @@
  */
 package org.grails.datastore.gorm
 
+import spock.lang.Issue
+
 import grails.persistence.Entity
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
-import spock.lang.Issue
 
 class BeforeUpdateEventSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([BeforeUpdateAuthor, BeforeUpdateBook])
     }
@@ -68,12 +70,14 @@ class BeforeUpdateEventSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager>
 
 @Entity
 class BeforeUpdateBook {
+
     Long id
     static hasMany = [authors: BeforeUpdateAuthor]
 }
 
 @Entity
 class BeforeUpdateAuthor {
+
     Long id
     BeforeUpdateBook book
 
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/BidirectionalOneToManyWithInheritanceSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/BidirectionalOneToManyWithInheritanceSpec.groovy
index e8b421dd47..e78d2faac4 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/BidirectionalOneToManyWithInheritanceSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/BidirectionalOneToManyWithInheritanceSpec.groovy
@@ -26,6 +26,7 @@ import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
  * @author graemerocher
  */
 class BidirectionalOneToManyWithInheritanceSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([ConfigurationItem, Documentation, ChangeRequest])
     }
@@ -49,6 +50,7 @@ class BidirectionalOneToManyWithInheritanceSpec extends GrailsDataTckSpec<Grails
 
 @Entity
 class ConfigurationItem {
+
     Long id
     Long version
     ConfigurationItem parent
@@ -65,12 +67,14 @@ class ConfigurationItem {
 
 @Entity
 class Documentation extends ConfigurationItem {
+
     Long id
     Long version
 }
 
 @Entity
 class ChangeRequest extends ConfigurationItem {
+
     Long id
     Long version
 }
\ No newline at end of file
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CacheAndJoinSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CacheAndJoinSpec.groovy
index 8c46d3e81e..500615bbe8 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CacheAndJoinSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CacheAndJoinSpec.groovy
@@ -18,12 +18,14 @@
  */
 package org.grails.datastore.gorm
 
+import spock.lang.Issue
+
 import grails.persistence.Entity
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
-import spock.lang.Issue
 
 class CacheAndJoinSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([Author, Book])
     }
@@ -48,6 +50,7 @@ class CacheAndJoinSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
 
 @Entity
 class Author {
+
     Long id
     String name
 
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CircularManyToManySpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CircularManyToManySpec.groovy
index d70dca4c63..6552b38f78 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CircularManyToManySpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CircularManyToManySpec.groovy
@@ -23,6 +23,7 @@ import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
 
 class CircularManyToManySpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([CircularPerson])
     }
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CircularManyToOneSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CircularManyToOneSpec.groovy
index baabc1a67b..f88251343d 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CircularManyToOneSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CircularManyToOneSpec.groovy
@@ -23,6 +23,7 @@ import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
 
 class CircularManyToOneSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([TreeNode])
     }
@@ -57,6 +58,7 @@ class CircularManyToOneSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager>
 
 @Entity
 class TreeNode {
+
     Long id
     TreeNode parent
     String name
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CircularOneToManySpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CircularOneToManySpec.groovy
index 864a088c98..66c931244a 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CircularOneToManySpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CircularOneToManySpec.groovy
@@ -23,6 +23,7 @@ import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
 
 class CircularOneToManySpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([CircularAuthor, CircularBook])
     }
@@ -53,17 +54,19 @@ class CircularOneToManySpec extends GrailsDataTckSpec<GrailsDataCoreTckManager>
 
 @Entity
 class CircularAuthor {
+
     Long id
     String name
     CircularBook favoriteBook
 
-    static hasMany = [ books: CircularBook ]
-    static mappedBy = [ books: 'author' ]
+    static hasMany = [books: CircularBook]
+    static mappedBy = [books: 'author']
     static constraints = { favoriteBook nullable: true }
 }
 
 @Entity
 class CircularBook {
+
     Long id
     String name
 
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CompositeIdentifierSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CompositeIdentifierSpec.groovy
index 02c7751e07..f9f29f890d 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CompositeIdentifierSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CompositeIdentifierSpec.groovy
@@ -18,33 +18,35 @@
  */
 package org.grails.datastore.gorm
 
+import spock.lang.PendingFeature
+
 import grails.persistence.Entity
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
-import spock.lang.PendingFeature
 
 /**
  * TODO: Support composite ids
  */
 class CompositeIdentifierSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([User, Role, UserRole])
     }
 
     @PendingFeature(reason = 'Composite ids not supported')
     void "Test that a composite identifier is treated as assigned"() {
-        given:"A domain model with a composite identifier"
-            def u = new User(name: "Bob").save()
-            def r = new Role(name: "Admin").save()
-            def ur = new UserRole(user: u, role: r)
-            ur.save flush: true
+        given: "A domain model with a composite identifier"
+        def u = new User(name: "Bob").save()
+        def r = new Role(name: "Admin").save()
+        def ur = new UserRole(user: u, role: r)
+        ur.save flush: true
         manager.session.clear()
 
-        when:"The entity is queried"
-            ur = UserRole.get(new UserRole(user: u, role: r))
+        when: "The entity is queried"
+        ur = UserRole.get(new UserRole(user: u, role: r))
 
-        then:"it is found"
-            ur != null
+        then: "it is found"
+        ur != null
     }
 }
 
@@ -61,12 +63,14 @@ class UserRole implements Serializable {
 
 @Entity
 class User {
+
     Long id
     String name
 }
 
 @Entity
 class Role {
+
     Long id
     String name
 }
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CoreTestSuite.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CoreTestSuite.groovy
index 36783582cd..b604a24a65 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CoreTestSuite.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CoreTestSuite.groovy
@@ -18,10 +18,11 @@
  */
 package org.grails.datastore.gorm
 
-import org.apache.grails.data.testing.tck.tests.NotInListSpec
 import org.junit.platform.suite.api.SelectClasses
 import org.junit.platform.suite.api.Suite
 
+import org.apache.grails.data.testing.tck.tests.NotInListSpec
+
 /**
  * Use this class to run tck classes against the current implementation.
  *
@@ -29,6 +30,6 @@ import org.junit.platform.suite.api.Suite
  */
 @Suite
 @SelectClasses([NotInListSpec])
-@spock.lang.IgnoreIf({ System.getProperty('core.gorm.suite') == 'true'  })
+@spock.lang.IgnoreIf({ System.getProperty('core.gorm.suite') == 'true' })
 class CoreTestSuite {
 }
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CriteriaProjectedResultsSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CriteriaProjectedResultsSpec.groovy
index 741dd7dd9d..328eab6761 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CriteriaProjectedResultsSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CriteriaProjectedResultsSpec.groovy
@@ -234,6 +234,7 @@ class CriteriaProjectedResultsSpec extends GrailsDataTckSpec<GrailsDataCoreTckMa
 
 @Entity
 class Check {
+
     Long id
     BigDecimal amount
     String descr
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CustomAutoTimestampSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CustomAutoTimestampSpec.groovy
index 10593fa6cc..5b5875e17e 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CustomAutoTimestampSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CustomAutoTimestampSpec.groovy
@@ -18,9 +18,7 @@
  */
 package org.grails.datastore.gorm
 
-import spock.lang.Requires
 
-import grails.gorm.annotation.LastModifiedDate
 import grails.gorm.annotation.CreatedDate
 import grails.gorm.annotation.LastModifiedDate
 import grails.persistence.Entity
@@ -29,6 +27,7 @@ import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
 import org.grails.datastore.gorm.events.AutoTimestampEventListener
 
 class CustomAutoTimestampSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([AutoTimestampedChildEntity, AutoTimestampedParentEntity, Image, RecordCustom, RecordWithAliases])
     }
@@ -216,6 +215,7 @@ class CustomAutoTimestampSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager
 
 @Entity
 class RecordCustom {
+
     Long id
     String name
     @CreatedDate
@@ -225,6 +225,7 @@ class RecordCustom {
 }
 
 class Media {
+
     @CreatedDate
     Date created
     @LastModifiedDate
@@ -233,12 +234,14 @@ class Media {
 
 @Entity
 class Image extends Media {
+
     Long id
     String format
 }
 
 @Entity
 class AutoTimestampedParentEntity {
+
     Long id
     @CreatedDate
     Date created
@@ -248,11 +251,13 @@ class AutoTimestampedParentEntity {
 
 @Entity
 class AutoTimestampedChildEntity extends AutoTimestampedParentEntity {
+
     String name
 }
 
 @Entity
 class RecordWithAliases {
+
     Long id
     String name
     @CreatedDate
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CustomSequenceIdentifierSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CustomSequenceIdentifierSpec.groovy
index 06e291ecc8..a06b82492e 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CustomSequenceIdentifierSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CustomSequenceIdentifierSpec.groovy
@@ -23,6 +23,7 @@ import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
 
 class CustomSequenceIdentifierSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([Book])
     }
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CustomStringIdentifierSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CustomStringIdentifierSpec.groovy
index 82fc73a57c..ad41e26bba 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CustomStringIdentifierSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CustomStringIdentifierSpec.groovy
@@ -80,12 +80,14 @@ class CustomStringIdentifierSpec extends GrailsDataTckSpec<GrailsDataCoreTckMana
 
 @Entity
 class Description {
+
     Integer id
     String name
 }
 
 @Entity
 class Product {
+
     String name
     Date dateCreated
 
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CustomTypeMarshallingSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CustomTypeMarshallingSpec.groovy
index e9059013a7..c741092e4c 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CustomTypeMarshallingSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/CustomTypeMarshallingSpec.groovy
@@ -18,13 +18,14 @@
  */
 package org.grails.datastore.gorm
 
-import grails.persistence.Entity
-import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
-import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
 import spock.lang.Issue
 import spock.lang.PendingFeature
 import spock.lang.Shared
 
+import grails.persistence.Entity
+import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
+import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
+
 class CustomTypeMarshallingSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
 
     @Shared
@@ -143,6 +144,7 @@ class Person {
 }
 
 class Birthday implements Comparable {
+
     Date date
 
     Birthday(Date date) {
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/DeindexingSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/DeindexingSpec.groovy
index 1e1cf5af03..ab2b3c7397 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/DeindexingSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/DeindexingSpec.groovy
@@ -26,6 +26,7 @@ import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
  * @author Daniel Wiell
  */
 class DeindexingSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([AuthorWithPseudonym])
     }
@@ -42,6 +43,7 @@ class DeindexingSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
 
 @Entity
 class AuthorWithPseudonym {
+
     Long id
     Integer version
     String name
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/DetachedCriteriaJpaEntitySpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/DetachedCriteriaJpaEntitySpec.groovy
index 921fa87f3a..40fe913277 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/DetachedCriteriaJpaEntitySpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/DetachedCriteriaJpaEntitySpec.groovy
@@ -18,10 +18,11 @@
  */
 package org.grails.datastore.gorm
 
+import spock.lang.Issue
+
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
 import org.grails.datastore.gorm.query.transform.ApplyDetachedCriteriaTransform
-import spock.lang.Issue
 
 /**
  * ensure that detached criteria ast transformations work on annotated jpa entities
@@ -29,6 +30,7 @@ import spock.lang.Issue
 @ApplyDetachedCriteriaTransform
 @Issue('GRAILS-9750')
 class DetachedCriteriaJpaEntitySpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([Todo])
     }
@@ -66,6 +68,7 @@ class DetachedCriteriaJpaEntitySpec extends GrailsDataTckSpec<GrailsDataCoreTckM
 @jakarta.persistence.Entity
 @grails.persistence.Entity
 class Todo {
+
     Long id
     String title
 }
\ No newline at end of file
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/DistinctProjectionSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/DistinctProjectionSpec.groovy
index d1b8972086..0f745d3e29 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/DistinctProjectionSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/DistinctProjectionSpec.groovy
@@ -18,9 +18,9 @@
  */
 package org.grails.datastore.gorm
 
-import org.apache.grails.data.testing.tck.domains.Person
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
+import org.apache.grails.data.testing.tck.domains.Person
 
 class DistinctProjectionSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
 
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/DomainWithPrimitiveGetterSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/DomainWithPrimitiveGetterSpec.groovy
index 9efcfb5370..7a3a0381a7 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/DomainWithPrimitiveGetterSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/DomainWithPrimitiveGetterSpec.groovy
@@ -18,40 +18,46 @@
  */
 package org.grails.datastore.gorm
 
+import spock.lang.Issue
+
 import grails.persistence.Entity
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
-import spock.lang.Issue
 
 class DomainWithPrimitiveGetterSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([DomainWithPrimitiveGetterAuthor, DomainWithPrimitiveGetterBook])
     }
 
     @Issue('GRAILS-8788')
     void "Test that a domain that contains a primitive getter maps correctly"() {
-        when:"The domain model is saved"
-            def author = new DomainWithPrimitiveGetterAuthor(name: "Stephen King")
-            author.save()
-            def book = new DomainWithPrimitiveGetterBook(title: "The Stand", author: author)
-            book.save flush:true
-        then:"The save executes correctly"
-            DomainWithPrimitiveGetterBook.count() == 1
-            DomainWithPrimitiveGetterAuthor.count() == 1
+        when: "The domain model is saved"
+        def author = new DomainWithPrimitiveGetterAuthor(name: "Stephen King")
+        author.save()
+        def book = new DomainWithPrimitiveGetterBook(title: "The Stand", author: author)
+        book.save flush: true
+        then: "The save executes correctly"
+        DomainWithPrimitiveGetterBook.count() == 1
+        DomainWithPrimitiveGetterAuthor.count() == 1
     }
 }
 
 @Entity
 class DomainWithPrimitiveGetterBook {
+
     Long id
     String title
     DomainWithPrimitiveGetterAuthor author
+
     int getValue(int param) {
         return 0
     }
 }
+
 @Entity
 class DomainWithPrimitiveGetterAuthor {
+
     Long id
     String name
     static hasMany = [books: DomainWithPrimitiveGetterBook]
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/DynamicFinderHungarianNotationSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/DynamicFinderHungarianNotationSpec.groovy
index 68845fb2dd..c734fe82a2 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/DynamicFinderHungarianNotationSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/DynamicFinderHungarianNotationSpec.groovy
@@ -18,14 +18,15 @@
  */
 package org.grails.datastore.gorm
 
-import org.apache.grails.data.testing.tck.domains.ClassWithHungarianNotation
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
+import org.apache.grails.data.testing.tck.domains.ClassWithHungarianNotation
 
 /**
  * Created by sdelamo on 12/10/2017.
  */
 class DynamicFinderHungarianNotationSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([ClassWithHungarianNotation])
     }
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/EmbeddedAssociationSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/EmbeddedAssociationSpec.groovy
index bd7fc8b8b0..62d6133066 100755
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/EmbeddedAssociationSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/EmbeddedAssociationSpec.groovy
@@ -18,10 +18,11 @@
  */
 package org.grails.datastore.gorm
 
+import spock.lang.Shared
+
 import grails.persistence.Entity
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
-import spock.lang.Shared
 
 class EmbeddedAssociationSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
 
@@ -53,6 +54,7 @@ class EmbeddedAssociationSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager
 
 @Entity
 class Individual {
+
     Long id
     String name
     Address address
@@ -67,11 +69,13 @@ class Individual {
 
 @Entity
 class Address {
+
     Long id
     String postCode
 }
 
 // Test embedded associations with custom types
 class Bio {
+
     Birthday birthday
 }
\ No newline at end of file
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/EmbeddedAssociationWithNoEntityAndGlobalNullableConstraintSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/EmbeddedAssociationWithNoEntityAndGlobalNullableConstraintSpec.groovy
index 73116e694c..29388abc08 100755
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/EmbeddedAssociationWithNoEntityAndGlobalNullableConstraintSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/EmbeddedAssociationWithNoEntityAndGlobalNullableConstraintSpec.groovy
@@ -18,23 +18,26 @@
  */
 package org.grails.datastore.gorm
 
+import spock.lang.AutoCleanup
+import spock.lang.Issue
+import spock.lang.Shared
+import spock.lang.Specification
+
 import grails.gorm.transactions.Transactional
 import grails.persistence.Entity
 import org.grails.datastore.gorm.validation.constraints.registry.DefaultValidatorRegistry
 import org.grails.datastore.mapping.config.Settings
 import org.grails.datastore.mapping.core.DatastoreUtils
 import org.grails.datastore.mapping.simple.SimpleMapDatastore
-import spock.lang.AutoCleanup
-import spock.lang.Issue
-import spock.lang.Shared
-import spock.lang.Specification
 
 class EmbeddedAssociationWithNoEntityAndGlobalNullableConstraintSpec extends Specification {
 
-    @Shared @AutoCleanup SimpleMapDatastore datastore = new SimpleMapDatastore(
-        DatastoreUtils.createPropertyResolver((Settings.SETTING_DEFAULT_CONSTRAINTS): { '*'(nullable: true) }),
-        [],
-        User2
+    @Shared
+    @AutoCleanup
+    SimpleMapDatastore datastore = new SimpleMapDatastore(
+            DatastoreUtils.createPropertyResolver((Settings.SETTING_DEFAULT_CONSTRAINTS): { '*'(nullable: true) }),
+            [],
+            User2
     )
 
     @Transactional
@@ -58,6 +61,7 @@ class EmbeddedAssociationWithNoEntityAndGlobalNullableConstraintSpec extends Spe
 
 @Entity
 class User2 {
+
     Long id
     String username
     String password
@@ -70,6 +74,7 @@ class User2 {
 }
 
 class Address2 {
+
     Long id
     String city
     String postCode
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/EmbeddedNonEntityAssociationSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/EmbeddedNonEntityAssociationSpec.groovy
index 692f6ff9fe..cd599e44ff 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/EmbeddedNonEntityAssociationSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/EmbeddedNonEntityAssociationSpec.groovy
@@ -23,6 +23,7 @@ import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
 
 class EmbeddedNonEntityAssociationSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([Being])
     }
@@ -47,6 +48,7 @@ class EmbeddedNonEntityAssociationSpec extends GrailsDataTckSpec<GrailsDataCoreT
 
 @Entity
 class Being {
+
     Long id
     String name
     ResidentialAddress address
@@ -58,5 +60,6 @@ class Being {
 }
 
 class ResidentialAddress {
+
     String postCode
 }
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/EmbeddedPropertyQuerySpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/EmbeddedPropertyQuerySpec.groovy
index e29ad1a45f..e3d061b3f8 100755
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/EmbeddedPropertyQuerySpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/EmbeddedPropertyQuerySpec.groovy
@@ -18,13 +18,13 @@
  */
 package org.grails.datastore.gorm
 
-import spock.lang.Requires
 
 import grails.persistence.Entity
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
 
 class EmbeddedPropertyQuerySpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([Book2, Author2])
     }
@@ -117,12 +117,14 @@ class EmbeddedPropertyQuerySpec extends GrailsDataTckSpec<GrailsDataCoreTckManag
 
 @Entity
 class Author2 {
+
     String name
     static hasMany = [books: Book2]
 }
 
 @Entity
 class Book2 {
+
     String name
     Period publishPeriod
 
@@ -130,6 +132,7 @@ class Book2 {
 }
 
 class Period {
+
     Date startDate
     Date endDate
 }
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/EnumHasManySpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/EnumHasManySpec.groovy
index ce3039bafb..2fee93d9a0 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/EnumHasManySpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/EnumHasManySpec.groovy
@@ -18,15 +18,17 @@
  */
 package org.grails.datastore.gorm
 
+import spock.lang.Issue
+
 import grails.persistence.Entity
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
-import spock.lang.Issue
 
 /**
  * @author Graeme Rocher
  */
 class EnumHasManySpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([Animal])
     }
@@ -75,6 +77,7 @@ class Animal {
 }
 
 enum Trait {
+
     TAIL,
     FOUR_LEGS,
     SPOTS,
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/FindByDomainInListSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/FindByDomainInListSpec.groovy
index 36da3bbccb..dbeba2efd7 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/FindByDomainInListSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/FindByDomainInListSpec.groovy
@@ -18,17 +18,18 @@
  */
 package org.grails.datastore.gorm
 
+import spock.lang.Issue
 
 import grails.persistence.Entity
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
-import spock.lang.Issue
 
 /**
  * @author graemerocher
  */
 @Issue('https://github.com/apache/grails-core/issues/2674')
 class FindByDomainInListSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([BookAuthor, AuthorBook])
     }
@@ -55,6 +56,7 @@ class FindByDomainInListSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager>
 
 @Entity
 class BookAuthor {
+
     Long id
     String name
 
@@ -73,6 +75,6 @@ class AuthorBook {
     String title
 
     BookAuthor author
-    static belongsTo = [author:BookAuthor]
+    static belongsTo = [author: BookAuthor]
 }
 
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/GormDirtyCheckingSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/GormDirtyCheckingSpec.groovy
index 7c7910f92d..e84545caa0 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/GormDirtyCheckingSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/GormDirtyCheckingSpec.groovy
@@ -18,12 +18,14 @@
  */
 package org.grails.datastore.gorm
 
+import spock.lang.Issue
+
 import grails.gorm.annotation.Entity
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
-import spock.lang.Issue
 
 class GormDirtyCheckingSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([Student, BooleanTest])
     }
@@ -53,11 +55,13 @@ class GormDirtyCheckingSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager>
 
 @Entity
 class Student {
+
     String name
 }
 
 @Entity
 class BooleanTest {
+
     Boolean property1
     boolean property2
 }
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/HasManyDefaultMappedBySpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/HasManyDefaultMappedBySpec.groovy
index be414f23fc..a303639345 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/HasManyDefaultMappedBySpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/HasManyDefaultMappedBySpec.groovy
@@ -24,6 +24,7 @@ import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
 import org.grails.datastore.mapping.model.types.Association
 
 class HasManyDefaultMappedBySpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([MyDomain, ChildDomain])
     }
@@ -43,6 +44,7 @@ class HasManyDefaultMappedBySpec extends GrailsDataTckSpec<GrailsDataCoreTckMana
 
 @Entity
 class MyDomain {
+
     Long id
     Set childs
     static hasMany = [childs: ChildDomain]
@@ -50,6 +52,7 @@ class MyDomain {
 
 @Entity
 class ChildDomain {
+
     Long id
     static belongsTo = [parent: MyDomain]
 
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/HasOneSetInverseSideSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/HasOneSetInverseSideSpec.groovy
index 88b344eb77..d67425db7c 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/HasOneSetInverseSideSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/HasOneSetInverseSideSpec.groovy
@@ -18,10 +18,11 @@
  */
 package org.grails.datastore.gorm
 
+import spock.lang.Issue
+
 import grails.persistence.Entity
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
-import spock.lang.Issue
 
 class HasOneSetInverseSideSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
 
@@ -54,6 +55,7 @@ class HasOneSetInverseSideSpec extends GrailsDataTckSpec<GrailsDataCoreTckManage
 
 @Entity
 class House {
+
     Long id
     String name
 
@@ -63,6 +65,7 @@ class House {
 
 @Entity
 class HouseAddress {
+
     Long id
     String street
     House house
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/InOperatorWithAssociationsSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/InOperatorWithAssociationsSpec.groovy
index 5606d78b70..9cea7af326 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/InOperatorWithAssociationsSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/InOperatorWithAssociationsSpec.groovy
@@ -18,15 +18,17 @@
  */
 package org.grails.datastore.gorm
 
+import spock.lang.Issue
+
 import grails.persistence.Entity
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
-import spock.lang.Issue
 
 /**
  * @author graemerocher
  */
 class InOperatorWithAssociationsSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([InAuthor, InBook])
     }
@@ -51,12 +53,14 @@ class InOperatorWithAssociationsSpec extends GrailsDataTckSpec<GrailsDataCoreTck
 
 @Entity
 class InAuthor {
+
     Long id
     String name
 }
 
 @Entity
 class InBook {
+
     Long id
     String name
     InAuthor author
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/InheritanceWithOneToManySpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/InheritanceWithOneToManySpec.groovy
index e4a658008f..fc924e6760 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/InheritanceWithOneToManySpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/InheritanceWithOneToManySpec.groovy
@@ -18,10 +18,11 @@
  */
 package org.grails.datastore.gorm
 
+import spock.lang.Issue
+
 import grails.persistence.Entity
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
-import spock.lang.Issue
 
 class InheritanceWithOneToManySpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
 
@@ -46,6 +47,7 @@ class InheritanceWithOneToManySpec extends GrailsDataTckSpec<GrailsDataCoreTckMa
 
 @Entity
 class Group {
+
     Long id
     String name
     static hasMany = [members: Member]
@@ -54,6 +56,7 @@ class Group {
 
 @Entity
 class Member {
+
     Long id
     String name
     String externalId
@@ -61,5 +64,6 @@ class Member {
 
 @Entity
 class SubMember extends Member {
+
     String extraName
 }
\ No newline at end of file
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/ListOrderByHungarianNotationSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/ListOrderByHungarianNotationSpec.groovy
index ad8559aecd..961cbe7989 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/ListOrderByHungarianNotationSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/ListOrderByHungarianNotationSpec.groovy
@@ -18,14 +18,15 @@
  */
 package org.grails.datastore.gorm
 
-import org.apache.grails.data.testing.tck.domains.ClassWithHungarianNotation
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
+import org.apache.grails.data.testing.tck.domains.ClassWithHungarianNotation
 
 /**
  * Created by sdelamo on 12/10/2017.
  */
 class ListOrderByHungarianNotationSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([ClassWithHungarianNotation])
     }
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/ManyToManySpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/ManyToManySpec.groovy
index 990b891a64..930c462be8 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/ManyToManySpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/ManyToManySpec.groovy
@@ -23,6 +23,7 @@ import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
 
 class ManyToManySpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([Account, Invoice])
     }
@@ -48,6 +49,7 @@ class ManyToManySpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
 
 @Entity
 class Account {
+
     Long id
     Set invoices
     static hasMany = [invoices: Invoice]
@@ -55,6 +57,7 @@ class Account {
 
 @Entity
 class Invoice {
+
     Long id
     static belongsTo = [Account]
     Set accounts
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/MappedByNoneSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/MappedByNoneSpec.groovy
index 5e7d85aa3b..9244e43ed5 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/MappedByNoneSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/MappedByNoneSpec.groovy
@@ -18,17 +18,19 @@
  */
 package org.grails.datastore.gorm
 
+import spock.lang.Issue
+
 import grails.persistence.Entity
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
 import org.grails.datastore.mapping.model.types.Association
-import spock.lang.Issue
 
 /**
  * @author graemerocher
  */
 @Issue('https://github.com/apache/grails-core/issues/669')
 class MappedByNoneSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([Player, SoftballTeamPreference])
     }
@@ -53,6 +55,7 @@ class Player {
 
 @Entity
 class SoftballTeamPreference {
+
     Long id
     Set players
     Player owner
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/NestedAssociationQuerySpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/NestedAssociationQuerySpec.groovy
index e12fb6ee39..b5fe825f0a 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/NestedAssociationQuerySpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/NestedAssociationQuerySpec.groovy
@@ -99,6 +99,7 @@ class NestedAssociationQuerySpec extends GrailsDataTckSpec<GrailsDataCoreTckMana
 
 @grails.persistence.Entity
 class UserOpinion {
+
     Long id
     Set answers = []
     static hasMany = [answers: Answer]
@@ -129,6 +130,7 @@ class Question {
 
 @grails.persistence.Entity
 class Release {
+
     Long id
     String name
     MilestoneCycle milestoneCycle
@@ -136,6 +138,7 @@ class Release {
 
 @grails.persistence.Entity
 class MilestoneCycle {
+
     Long id
     String name
     Department department
@@ -143,6 +146,7 @@ class MilestoneCycle {
 
 @grails.persistence.Entity
 class Department {
+
     Long id
     String name
 }
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/NotLikeSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/NotLikeSpec.groovy
index d479e3d93d..a77fd5f8d6 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/NotLikeSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/NotLikeSpec.groovy
@@ -18,9 +18,9 @@
  */
 package org.grails.datastore.gorm
 
-import org.apache.grails.data.testing.tck.domains.TestEntity
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
+import org.apache.grails.data.testing.tck.domains.TestEntity
 
 /**
  * Created by graemerocher on 22/08/2017.
@@ -34,9 +34,9 @@ class NotLikeSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
 
     void "test not like"() {
         when:
-        new TestEntity(name:"Fred").save()
-        new TestEntity(name:"Frank").save()
-        new TestEntity(name:"Jack").save(flush:true)
+        new TestEntity(name: "Fred").save()
+        new TestEntity(name: "Frank").save()
+        new TestEntity(name: "Jack").save(flush: true)
 
         then:
         TestEntity.countByNameNotLike("F%") == 1
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/NotNullQuerySpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/NotNullQuerySpec.groovy
index c20d8389b2..17716d292d 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/NotNullQuerySpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/NotNullQuerySpec.groovy
@@ -23,6 +23,7 @@ import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
 
 class NotNullQuerySpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([NullMe, NullOther])
     }
@@ -112,6 +113,7 @@ class NotNullQuerySpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
 
 @Entity
 class NullMe {
+
     Long id
     String name
     String job
@@ -129,6 +131,7 @@ class NullMe {
 
 @Entity
 class NullOther {
+
     Long id
     String name
 
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/OneToOneWithProxiesSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/OneToOneWithProxiesSpec.groovy
index 74343e045e..ffbd7bfbe0 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/OneToOneWithProxiesSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/OneToOneWithProxiesSpec.groovy
@@ -18,11 +18,11 @@
  */
 package org.grails.datastore.gorm
 
+import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
+import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
 import org.apache.grails.data.testing.tck.domains.Face
 import org.apache.grails.data.testing.tck.domains.Nose
 import org.apache.grails.data.testing.tck.domains.Pet
-import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
-import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
 import org.grails.datastore.mapping.proxy.EntityProxy
 
 /**
@@ -31,7 +31,7 @@ import org.grails.datastore.mapping.proxy.EntityProxy
 class OneToOneWithProxiesSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
 
     def setupSpec() {
-        manager.addAllDomainClasses([ Face, Nose, Pet, org.apache.grails.data.testing.tck.domains.Person])
+        manager.addAllDomainClasses([Face, Nose, Pet, org.apache.grails.data.testing.tck.domains.Person])
     }
 
     void "Test persist and retrieve unidirectional many-to-one"() {
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/OrderBySpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/OrderBySpec.groovy
index ea7629244b..c6a125a1a7 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/OrderBySpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/OrderBySpec.groovy
@@ -18,11 +18,10 @@
  */
 package org.grails.datastore.gorm
 
-import org.apache.grails.data.testing.tck.domains.ChildEntity
-import org.apache.grails.data.testing.tck.domains.TestEntity
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
-import spock.lang.Requires
+import org.apache.grails.data.testing.tck.domains.ChildEntity
+import org.apache.grails.data.testing.tck.domains.TestEntity
 
 /**
  * @author Daniel Wiell
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/QueryAssociationSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/QueryAssociationSpec.groovy
index d5139a9d84..acbc6816be 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/QueryAssociationSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/QueryAssociationSpec.groovy
@@ -18,12 +18,12 @@
  */
 package org.grails.datastore.gorm
 
+import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
+import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
 import org.apache.grails.data.testing.tck.domains.ChildEntity
 import org.apache.grails.data.testing.tck.domains.Plant
 import org.apache.grails.data.testing.tck.domains.PlantCategory
 import org.apache.grails.data.testing.tck.domains.TestEntity
-import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
-import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
 
 class QueryAssociationSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
 
@@ -279,7 +279,7 @@ class QueryAssociationSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
 
         categories.size() == 3
         categories[0] instanceof PlantCategory
-        categories[0].plants?.size() == 2
+                categories[0].plants?.size() == 2
 
         when: "A query on the child association with an equals criterion is executed"
         def results = PlantCategory.withCriteria {
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/QueryNonIndexedPropertySpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/QueryNonIndexedPropertySpec.groovy
index 7eb4c87543..c024516e4c 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/QueryNonIndexedPropertySpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/QueryNonIndexedPropertySpec.groovy
@@ -53,6 +53,7 @@ class QueryNonIndexedPropertySpec extends GrailsDataTckSpec<GrailsDataCoreTckMan
 
 @Entity
 class Company {
+
     Long id
     String name
     CompanyAddress address
@@ -60,6 +61,7 @@ class Company {
 
 @Entity
 class CompanyAddress {
+
     Long id
     String postCode
 }
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/ReadOnlyCriteriaResultsSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/ReadOnlyCriteriaResultsSpec.groovy
index 7498735b81..8d7b4defba 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/ReadOnlyCriteriaResultsSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/ReadOnlyCriteriaResultsSpec.groovy
@@ -18,12 +18,14 @@
  */
 package org.grails.datastore.gorm
 
+import spock.lang.Issue
+
 import grails.persistence.Entity
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
-import spock.lang.Issue
 
 class ReadOnlyCriteriaResultsSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([FamilyMember])
     }
@@ -49,6 +51,7 @@ class ReadOnlyCriteriaResultsSpec extends GrailsDataTckSpec<GrailsDataCoreTckMan
 
 @Entity
 class FamilyMember {
+
     Long id
     String name
 }
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/SaveWithFailOnErrorDefaultSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/SaveWithFailOnErrorDefaultSpec.groovy
index 931db98b98..1825beed2a 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/SaveWithFailOnErrorDefaultSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/SaveWithFailOnErrorDefaultSpec.groovy
@@ -18,16 +18,18 @@
  */
 package org.grails.datastore.gorm
 
+import org.springframework.validation.Errors
+import org.springframework.validation.Validator
+
 import grails.gorm.annotation.Entity
 import grails.gorm.validation.ConstrainedProperty
 import grails.validation.ValidationException
 import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
 import org.grails.datastore.gorm.validation.constraints.eval.DefaultConstraintEvaluator
-import org.springframework.validation.Errors
-import org.springframework.validation.Validator
 
 class SaveWithFailOnErrorDefaultSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([TestProduct])
     }
@@ -87,6 +89,7 @@ class SaveWithFailOnErrorDefaultSpec extends GrailsDataTckSpec<GrailsDataCoreTck
 
 @Entity
 class TestProduct {
+
     Long id
     String name
 
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/UUIDTypeIdentifierSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/UUIDTypeIdentifierSpec.groovy
index 3dc8ff155c..2cfbcd16c2 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/UUIDTypeIdentifierSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/UUIDTypeIdentifierSpec.groovy
@@ -23,6 +23,7 @@ import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
 
 class UUIDTypeIdentifierSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([SimpleUUIDModel])
     }
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/UUIIdentifierSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/UUIIdentifierSpec.groovy
index b162af545b..db482500e0 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/UUIIdentifierSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/UUIIdentifierSpec.groovy
@@ -23,6 +23,7 @@ import org.apache.grails.data.simple.core.GrailsDataCoreTckManager
 import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
 
 class UUIIdentifierSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([DocumentModel])
     }
@@ -45,6 +46,7 @@ class UUIIdentifierSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
 
 @Entity
 class DocumentModel {
+
     static final SCORE = 40
 
     String id // UUID , for replications / optimization
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/schemaless/ImplementsDynamicAttributes.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/schemaless/ImplementsDynamicAttributes.groovy
index 447bfc02f8..4d9ee449ab 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/schemaless/ImplementsDynamicAttributes.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/schemaless/ImplementsDynamicAttributes.groovy
@@ -54,7 +54,9 @@ class DynamicDomainSpec extends Specification {
 }
 
 class DynamicEntity implements DynamicAttributes {
+
     String name
+
     String getFoo() {
         'foo'
     }
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/validation/UniqueConstraintSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/validation/UniqueConstraintSpec.groovy
index ff71474cef..b142a2f4f7 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/validation/UniqueConstraintSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/gorm/validation/UniqueConstraintSpec.groovy
@@ -18,6 +18,11 @@
  */
 package org.grails.datastore.gorm.validation
 
+import spock.lang.AutoCleanup
+import spock.lang.Specification
+
+import org.springframework.context.support.StaticMessageSource
+
 import grails.gorm.annotation.Entity
 import grails.gorm.transactions.Transactional
 import org.grails.datastore.gorm.validation.constraints.MappingContextAwareConstraintFactory
@@ -25,14 +30,12 @@ import org.grails.datastore.gorm.validation.constraints.builtin.UniqueConstraint
 import org.grails.datastore.gorm.validation.constraints.registry.ConstraintRegistry
 import org.grails.datastore.gorm.validation.constraints.registry.DefaultValidatorRegistry
 import org.grails.datastore.mapping.simple.SimpleMapDatastore
-import org.springframework.context.support.StaticMessageSource
-import spock.lang.AutoCleanup
-import spock.lang.Specification
 
 @Transactional
 class UniqueConstraintSpec extends Specification {
 
-    @AutoCleanup SimpleMapDatastore datastore = new SimpleMapDatastore(
+    @AutoCleanup
+    SimpleMapDatastore datastore = new SimpleMapDatastore(
             Channel,
             DefaultChannel,
             ListChannel,
@@ -201,6 +204,7 @@ class OtherListChannel extends ListChannel {
 
 @Entity
 class Organization {
+
     String name
 
     DefaultChannel defaultChannel = new DefaultChannel()
diff --git a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/mapping/EntityReflectorSpec.groovy b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/mapping/EntityReflectorSpec.groovy
index a8cfbb86a9..a5540eeed9 100644
--- a/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/mapping/EntityReflectorSpec.groovy
+++ b/grails-datamapping-core-test/src/test/groovy/org/grails/datastore/mapping/EntityReflectorSpec.groovy
@@ -26,6 +26,7 @@ import org.apache.grails.data.testing.tck.base.GrailsDataTckSpec
  * Created by Jim on 8/19/2016.
  */
 class EntityReflectorSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
+
     void setupSpec() {
         manager.addAllDomainClasses([Library, LibraryBook])
     }
@@ -43,11 +44,13 @@ class EntityReflectorSpec extends GrailsDataTckSpec<GrailsDataCoreTckManager> {
 
 @Entity
 class Library {
+
     Long id
 }
 
 @Entity
 class LibraryBook {
+
     Long id
     Library library
 }