From e972181288ee7c1b69fb32184695e13dfdc5ff65 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 5 Jun 2019 16:28:36 +0200 Subject: [PATCH] =?UTF-8?q?DATACASS-663=20-=20Replace=20StepVerifier.creat?= =?UTF-8?q?e(=E2=80=A6)=20style=20with=20.as(StepVerifier::create)=20style?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AbstractCassandraConfiguration.java | 4 +- .../config/CassandraClusterFactoryBean.java | 77 +++++-------- .../CassandraCqlSessionFactoryBean.java | 4 +- .../config/CassandraSessionFactoryBean.java | 8 +- .../core/AsyncCassandraTemplate.java | 38 +++---- .../core/CassandraAdminOperations.java | 9 +- .../core/CassandraAdminTemplate.java | 6 +- .../core/CassandraBatchTemplate.java | 28 ++--- ...assandraPersistentEntitySchemaCreator.java | 11 +- .../cassandra/core/CassandraTemplate.java | 53 ++++----- .../data/cassandra/core/DeleteOptions.java | 8 +- .../data/cassandra/core/EntityOperations.java | 6 +- .../core/ExecutableDeleteOperation.java | 3 +- .../ExecutableDeleteOperationSupport.java | 2 +- .../core/ExecutableInsertOperation.java | 3 +- .../ExecutableInsertOperationSupport.java | 2 +- .../core/ExecutableSelectOperation.java | 14 +-- .../ExecutableSelectOperationSupport.java | 23 ++-- .../core/ExecutableUpdateOperation.java | 17 ++- .../ExecutableUpdateOperationSupport.java | 2 +- .../core/ReactiveCassandraBatchTemplate.java | 34 +++--- .../core/ReactiveCassandraTemplate.java | 68 +++++------ .../core/ReactiveDeleteOperation.java | 11 +- .../core/ReactiveDeleteOperationSupport.java | 1 - .../core/ReactiveInsertOperation.java | 13 +-- .../core/ReactiveSelectOperation.java | 14 +-- .../core/ReactiveSelectOperationSupport.java | 4 +- .../core/ReactiveUpdateOperation.java | 13 +-- .../core/ReactiveUpdateOperationSupport.java | 1 - .../data/cassandra/core/StatementFactory.java | 14 +-- .../data/cassandra/core/UpdateOptions.java | 8 +- .../convert/AbstractCassandraConverter.java | 4 +- .../BasicCassandraRowValueProvider.java | 5 +- .../convert/CassandraCustomConversions.java | 3 +- .../CassandraThreeTenBackPortConverters.java | 5 +- .../convert/CassandraUDTValueProvider.java | 3 +- .../cassandra/core/convert/UpdateMapper.java | 8 +- .../core/cql/AsyncCqlOperations.java | 17 ++- .../data/cassandra/core/cql/CqlTemplate.java | 8 +- .../data/cassandra/core/cql/QueryOptions.java | 7 +- .../core/cql/ReactiveCqlTemplate.java | 6 +- .../cql/generator/AddColumnCqlGenerator.java | 3 +- .../generator/CreateIndexCqlGenerator.java | 4 +- .../generator/CreateKeyspaceCqlGenerator.java | 3 +- .../generator/CreateUserTypeCqlGenerator.java | 3 +- .../generator/DropKeyspaceCqlGenerator.java | 4 +- .../cql/generator/DropTableCqlGenerator.java | 3 +- .../generator/RenameColumnCqlGenerator.java | 3 +- .../DefaultBridgedReactiveSession.java | 12 +- .../CachedPreparedStatementCreator.java | 5 +- .../BasicCassandraPersistentEntity.java | 13 +-- ...andraPersistentEntityMetadataVerifier.java | 8 +- .../BasicCassandraPersistentProperty.java | 16 +-- .../BasicCassandraPersistentTupleEntity.java | 6 +- ...BasicCassandraPersistentTupleProperty.java | 9 +- .../core/mapping/CassandraMappingContext.java | 22 ++-- .../mapping/CassandraPersistentProperty.java | 6 +- ...sandraPersistentTupleMetadataVerifier.java | 9 +- .../mapping/CassandraSimpleTypeHolder.java | 7 +- .../cassandra/core/mapping/EntityMapping.java | 2 +- .../mapping/IndexSpecificationFactory.java | 11 +- ...PrimaryKeyClassEntityMetadataVerifier.java | 26 ++--- .../core/query/CassandraPageRequest.java | 3 +- .../core/query/CriteriaDefinition.java | 15 +-- .../data/cassandra/core/query/Query.java | 23 ++-- .../data/cassandra/core/query/Update.java | 2 +- .../query/AbstractCassandraQuery.java | 4 +- .../query/CassandraQueryMethod.java | 4 +- .../query/ConvertingParameterAccessor.java | 8 +- .../repository/query/ProjectionUtil.java | 9 +- .../ReactiveStringBasedCassandraQuery.java | 19 ++-- .../query/StringBasedCassandraQuery.java | 11 +- .../repository/query/StringBasedQuery.java | 3 +- .../support/CassandraRepositoryFactory.java | 3 +- .../repository/support/InsertUtil.java | 4 +- .../MappingCassandraEntityInformation.java | 3 +- ...tiveCassandraTemplateIntegrationTests.java | 48 ++++---- .../ReactiveCassandraTemplateUnitTests.java | 28 ++--- ...eleteOperationSupportIntegrationTests.java | 6 +- ...nsertOperationSupportIntegrationTests.java | 8 +- ...electOperationSupportIntegrationTests.java | 52 +++++---- ...pdateOperationSupportIntegrationTests.java | 4 +- ...ridgedReactiveSessionIntegrationTests.java | 13 ++- ...efaultBridgedReactiveSessionUnitTests.java | 2 +- .../ReactiveCqlTemplateIntegrationTests.java | 25 ++-- .../cql/ReactiveCqlTemplateUnitTests.java | 107 +++++++++--------- ...rtingReactiveCassandraRepositoryTests.java | 17 +-- ...veCassandraRepositoryIntegrationTests.java | 51 +++++---- ...veCassandraRepositoryIntegrationTests.java | 101 +++++++++-------- 89 files changed, 610 insertions(+), 703 deletions(-) diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/config/AbstractCassandraConfiguration.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/config/AbstractCassandraConfiguration.java index 3387665a6..7d65593e8 100644 --- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/config/AbstractCassandraConfiguration.java +++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/config/AbstractCassandraConfiguration.java @@ -149,8 +149,8 @@ public abstract class AbstractCassandraConfiguration extends AbstractClusterConf UserTypeResolver userTypeResolver = new SimpleUserTypeResolver(cluster, getKeyspaceName()); - CassandraMappingContext mappingContext = - new CassandraMappingContext(userTypeResolver, new SimpleTupleTypeFactory(cluster)); + CassandraMappingContext mappingContext = new CassandraMappingContext(userTypeResolver, + new SimpleTupleTypeFactory(cluster)); Optional.ofNullable(this.beanClassLoader).ifPresent(mappingContext::setBeanClassLoader); diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/config/CassandraClusterFactoryBean.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/config/CassandraClusterFactoryBean.java index f16530298..5f78ce29f 100644 --- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/config/CassandraClusterFactoryBean.java +++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/config/CassandraClusterFactoryBean.java @@ -26,6 +26,7 @@ import java.util.Set; import org.slf4j.Logger; import org.slf4j.LoggerFactory; + import org.springframework.beans.factory.BeanNameAware; import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.FactoryBean; @@ -48,20 +49,9 @@ import org.springframework.util.ClassUtils; import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; -import com.datastax.driver.core.AuthProvider; -import com.datastax.driver.core.Cluster; +import com.datastax.driver.core.*; import com.datastax.driver.core.Cluster.Builder; -import com.datastax.driver.core.Host; -import com.datastax.driver.core.LatencyTracker; -import com.datastax.driver.core.NettyOptions; -import com.datastax.driver.core.PoolingOptions; import com.datastax.driver.core.ProtocolOptions.Compression; -import com.datastax.driver.core.ProtocolVersion; -import com.datastax.driver.core.QueryOptions; -import com.datastax.driver.core.SSLOptions; -import com.datastax.driver.core.Session; -import com.datastax.driver.core.SocketOptions; -import com.datastax.driver.core.TimestampGenerator; import com.datastax.driver.core.policies.AddressTranslator; import com.datastax.driver.core.policies.LoadBalancingPolicy; import com.datastax.driver.core.policies.ReconnectionPolicy; @@ -186,8 +176,7 @@ public class CassandraClusterFactoryBean Builder clusterBuilder = newClusterBuilder() .addContactPoints(StringUtils.commaDelimitedListToStringArray(this.contactPoints)) - .withMaxSchemaAgreementWaitSeconds(this.maxSchemaAgreementWaitSeconds) - .withPort(this.port); + .withMaxSchemaAgreementWaitSeconds(this.maxSchemaAgreementWaitSeconds).withPort(this.port); Optional.ofNullable(this.addressTranslator).ifPresent(clusterBuilder::withAddressTranslator); Optional.ofNullable(this.loadBalancingPolicy).ifPresent(clusterBuilder::withLoadBalancingPolicy); @@ -201,15 +190,12 @@ public class CassandraClusterFactoryBean Optional.ofNullable(this.speculativeExecutionPolicy).ifPresent(clusterBuilder::withSpeculativeExecutionPolicy); Optional.ofNullable(this.timestampGenerator).ifPresent(clusterBuilder::withTimestampGenerator); - Optional.ofNullable(this.authProvider) - .map(clusterBuilder::withAuthProvider) - .orElseGet(() -> StringUtils.hasText(this.username) - ? clusterBuilder.withCredentials(this.username, this.password) - : clusterBuilder); + Optional.ofNullable(this.authProvider).map(clusterBuilder::withAuthProvider).orElseGet( + () -> StringUtils.hasText(this.username) ? clusterBuilder.withCredentials(this.username, this.password) + : clusterBuilder); - Optional.ofNullable(this.compressionType) - .map(CassandraClusterFactoryBean::convertCompressionType) - .ifPresent(clusterBuilder::withCompression); + Optional.ofNullable(this.compressionType).map(CassandraClusterFactoryBean::convertCompressionType) + .ifPresent(clusterBuilder::withCompression); if (!this.jmxReportingEnabled) { clusterBuilder.withoutJMXReporting(); @@ -220,14 +206,10 @@ public class CassandraClusterFactoryBean } if (this.sslEnabled) { - Optional.ofNullable(this.sslOptions) - .map(clusterBuilder::withSSL) - .orElseGet(clusterBuilder::withSSL); + Optional.ofNullable(this.sslOptions).map(clusterBuilder::withSSL).orElseGet(clusterBuilder::withSSL); } - Optional.ofNullable(resolveClusterName()) - .filter(StringUtils::hasText) - .ifPresent(clusterBuilder::withClusterName); + Optional.ofNullable(resolveClusterName()).filter(StringUtils::hasText).ifPresent(clusterBuilder::withClusterName); if (this.clusterBuilderConfigurer != null) { this.clusterBuilderConfigurer.configure(clusterBuilder); @@ -254,7 +236,8 @@ public class CassandraClusterFactoryBean * (non-Javadoc) * @see com.datastax.driver.core.Cluster#builder() */ - @NonNull Cluster.Builder newClusterBuilder() { + @NonNull + Cluster.Builder newClusterBuilder() { return Cluster.builder(); } @@ -274,8 +257,8 @@ public class CassandraClusterFactoryBean generateSpecificationsFromFactoryBeans(); - List startupSpecifications = - new ArrayList<>(this.keyspaceCreations.size() + this.keyspaceAlterations.size()); + List startupSpecifications = new ArrayList<>( + this.keyspaceCreations.size() + this.keyspaceAlterations.size()); startupSpecifications.addAll(this.keyspaceCreations); startupSpecifications.addAll(this.keyspaceAlterations); @@ -295,7 +278,7 @@ public class CassandraClusterFactoryBean CqlTemplate template = new CqlTemplate(session); keyspaceActionSpecifications - .forEach(keyspaceActionSpecification -> template.execute(toCql(keyspaceActionSpecification))); + .forEach(keyspaceActionSpecification -> template.execute(toCql(keyspaceActionSpecification))); scripts.forEach(template::execute); } @@ -303,8 +286,8 @@ public class CassandraClusterFactoryBean } /** - * Evaluates the contents of all the KeyspaceSpecificationFactoryBeans - * and generates the proper KeyspaceSpecification from them. + * Evaluates the contents of all the KeyspaceSpecificationFactoryBeans and generates the proper KeyspaceSpecification + * from them. */ private void generateSpecificationsFromFactoryBeans() { @@ -318,31 +301,26 @@ public class CassandraClusterFactoryBean if (keyspaceActionSpecification instanceof AlterKeyspaceSpecification) { this.keyspaceAlterations.add((AlterKeyspaceSpecification) keyspaceActionSpecification); - } - else if (keyspaceActionSpecification instanceof CreateKeyspaceSpecification) { + } else if (keyspaceActionSpecification instanceof CreateKeyspaceSpecification) { this.keyspaceCreations.add((CreateKeyspaceSpecification) keyspaceActionSpecification); - } - else if (keyspaceActionSpecification instanceof DropKeyspaceSpecification) { + } else if (keyspaceActionSpecification instanceof DropKeyspaceSpecification) { this.keyspaceDrops.add((DropKeyspaceSpecification) keyspaceActionSpecification); } }); } - private String toCql(KeyspaceActionSpecification specification) { if (specification instanceof AlterKeyspaceSpecification) { return new AlterKeyspaceCqlGenerator((AlterKeyspaceSpecification) specification).toCql(); - } - else if (specification instanceof CreateKeyspaceSpecification) { + } else if (specification instanceof CreateKeyspaceSpecification) { return new CreateKeyspaceCqlGenerator((CreateKeyspaceSpecification) specification).toCql(); - } - else if (specification instanceof DropKeyspaceSpecification) { + } else if (specification instanceof DropKeyspaceSpecification) { return new DropKeyspaceCqlGenerator((DropKeyspaceSpecification) specification).toCql(); } - throw new IllegalArgumentException("Unsupported specification type: " - + ClassUtils.getQualifiedName(specification.getClass())); + throw new IllegalArgumentException( + "Unsupported specification type: " + ClassUtils.getQualifiedName(specification.getClass())); } /* @@ -698,13 +676,12 @@ public class CassandraClusterFactoryBean /** * Sets the {@link ClusterBuilderConfigurer} used to apply additional configuration logic to the - * {@link com.datastax.driver.core.Cluster.Builder} object. - * - * {@link ClusterBuilderConfigurer} is invoked after all provided options are configured. The factory will - * {@link Builder#build()} the {@link Cluster} after applying {@link ClusterBuilderConfigurer}. + * {@link com.datastax.driver.core.Cluster.Builder} object. {@link ClusterBuilderConfigurer} is invoked after all + * provided options are configured. The factory will {@link Builder#build()} the {@link Cluster} after applying + * {@link ClusterBuilderConfigurer}. * * @param clusterBuilderConfigurer {@link ClusterBuilderConfigurer} used to configure the - * {@link com.datastax.driver.core.Cluster.Builder}. + * {@link com.datastax.driver.core.Cluster.Builder}. * @see org.springframework.data.cassandra.config.ClusterBuilderConfigurer */ public void setClusterBuilderConfigurer(@Nullable ClusterBuilderConfigurer clusterBuilderConfigurer) { diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/config/CassandraCqlSessionFactoryBean.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/config/CassandraCqlSessionFactoryBean.java index e5e0556db..3ffacd3f7 100644 --- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/config/CassandraCqlSessionFactoryBean.java +++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/config/CassandraCqlSessionFactoryBean.java @@ -87,9 +87,7 @@ public class CassandraCqlSessionFactoryBean /* (non-Javadoc) */ Session connect(@Nullable String keyspaceName) { - return StringUtils.hasText(keyspaceName) - ? getCluster().connect(keyspaceName) - : getCluster().connect(); + return StringUtils.hasText(keyspaceName) ? getCluster().connect(keyspaceName) : getCluster().connect(); } /* diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/config/CassandraSessionFactoryBean.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/config/CassandraSessionFactoryBean.java index f2b202fad..8a288d8cd 100644 --- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/config/CassandraSessionFactoryBean.java +++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/config/CassandraSessionFactoryBean.java @@ -159,13 +159,13 @@ public class CassandraSessionFactoryBean extends CassandraCqlSessionFactoryBean private void performSchemaActions(boolean drop, boolean dropUnused, boolean ifNotExists) { - CassandraPersistentEntitySchemaCreator schemaCreator = - new CassandraPersistentEntitySchemaCreator(getMappingContext(), getCassandraAdminOperations()); + CassandraPersistentEntitySchemaCreator schemaCreator = new CassandraPersistentEntitySchemaCreator( + getMappingContext(), getCassandraAdminOperations()); if (drop) { - CassandraPersistentEntitySchemaDropper schemaDropper = - new CassandraPersistentEntitySchemaDropper(getMappingContext(), getCassandraAdminOperations()); + CassandraPersistentEntitySchemaDropper schemaDropper = new CassandraPersistentEntitySchemaDropper( + getMappingContext(), getCassandraAdminOperations()); schemaDropper.dropTables(dropUnused); schemaDropper.dropUserTypes(dropUnused); diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/AsyncCassandraTemplate.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/AsyncCassandraTemplate.java index 9bd5fda54..2ad114746 100644 --- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/AsyncCassandraTemplate.java +++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/AsyncCassandraTemplate.java @@ -15,12 +15,12 @@ */ package org.springframework.data.cassandra.core; +import lombok.Value; + import java.util.List; import java.util.function.Consumer; import java.util.function.Function; -import lombok.Value; - import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.ApplicationEventPublisherAware; @@ -193,8 +193,8 @@ public class AsyncCassandraTemplate implements AsyncCassandraOperations, Applica } /** - * Returns the {@link EntityOperations} used to perform data access operations on an entity - * inside a Cassandra data source. + * Returns the {@link EntityOperations} used to perform data access operations on an entity inside a Cassandra data + * source. * * @return the configured {@link EntityOperations} for this template. * @see org.springframework.data.cassandra.core.EntityOperations @@ -299,7 +299,7 @@ public class AsyncCassandraTemplate implements AsyncCassandraOperations, Applica */ @Override public ListenableFuture select(Statement statement, Consumer entityConsumer, Class entityClass) - throws DataAccessException { + throws DataAccessException { Assert.notNull(statement, "Statement must not be null"); Assert.notNull(entityConsumer, "Entity Consumer must not be empty"); @@ -360,14 +360,14 @@ public class AsyncCassandraTemplate implements AsyncCassandraOperations, Applica */ @Override public ListenableFuture select(Query query, Consumer entityConsumer, Class entityClass) - throws DataAccessException { + throws DataAccessException { Assert.notNull(query, "Query must not be null"); Assert.notNull(entityConsumer, "Entity Consumer must not be empty"); Assert.notNull(entityClass, "Entity type must not be null"); - return select(getStatementFactory() - .select(query, getRequiredPersistentEntity(entityClass)), entityConsumer, entityClass); + return select(getStatementFactory().select(query, getRequiredPersistentEntity(entityClass)), entityConsumer, + entityClass); } /* (non-Javadoc) @@ -550,8 +550,7 @@ public class AsyncCassandraTemplate implements AsyncCassandraOperations, Applica Insert insert = EntityQueryUtils.createInsertQuery(tableName.toCql(), entityToUse, options, getConverter(), persistentEntity); - return source.isVersionedEntity() - ? doInsertVersioned(insert.ifNotExists(), entityToUse, source, tableName) + return source.isVersionedEntity() ? doInsertVersioned(insert.ifNotExists(), entityToUse, source, tableName) : doInsert(insert, entityToUse, source, tableName); } @@ -562,8 +561,8 @@ public class AsyncCassandraTemplate implements AsyncCassandraOperations, Applica if (!result.wasApplied()) { throw new OptimisticLockingFailureException( - String.format("Cannot insert entity %s with version %s into table %s as it already exists", - entity, source.getVersion(), tableName)); + String.format("Cannot insert entity %s with version %s into table %s as it already exists", entity, + source.getVersion(), tableName)); } }); } @@ -596,8 +595,7 @@ public class AsyncCassandraTemplate implements AsyncCassandraOperations, Applica CassandraPersistentEntity persistentEntity = getRequiredPersistentEntity(entity.getClass()); CqlIdentifier tableName = persistentEntity.getTableName(); - return source.isVersionedEntity() - ? doUpdateVersioned(source, options, tableName, persistentEntity) + return source.isVersionedEntity() ? doUpdateVersioned(source, options, tableName, persistentEntity) : doUpdate(entity, options, tableName, persistentEntity); } @@ -614,8 +612,8 @@ public class AsyncCassandraTemplate implements AsyncCassandraOperations, Applica if (!result.wasApplied()) { throw new OptimisticLockingFailureException( - String.format("Cannot save entity %s with version %s to table %s. Has it been modified meanwhile?", - entity, source.getVersion(), tableName)); + String.format("Cannot save entity %s with version %s to table %s. Has it been modified meanwhile?", entity, + source.getVersion(), tableName)); } }); } @@ -651,8 +649,7 @@ public class AsyncCassandraTemplate implements AsyncCassandraOperations, Applica Delete delete = getStatementFactory().delete(entity, options, getConverter(), persistentEntity, tableName); - return source.isVersionedEntity() - ? doDeleteVersioned(delete, entity, source, tableName) + return source.isVersionedEntity() ? doDeleteVersioned(delete, entity, source, tableName) : doDelete(delete, entity, tableName); } @@ -722,7 +719,7 @@ public class AsyncCassandraTemplate implements AsyncCassandraOperations, Applica private ListenableFuture> executeSave(T entity, CqlIdentifier tableName, Statement statement) { - return executeSave(entity, tableName, statement, ignore -> { }); + return executeSave(entity, tableName, statement, ignore -> {}); } private ListenableFuture> executeSave(T entity, CqlIdentifier tableName, Statement statement, @@ -784,8 +781,7 @@ public class AsyncCassandraTemplate implements AsyncCassandraOperations, Applica return getAsyncCqlOperations() .execute((AsyncSessionCallback) session -> AsyncResult.forValue(getConfiguredFetchSize(session))) - .completable() - .join(); + .completable().join(); } @SuppressWarnings("unchecked") diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/CassandraAdminOperations.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/CassandraAdminOperations.java index fe6205bbf..9ffe89890 100644 --- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/CassandraAdminOperations.java +++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/CassandraAdminOperations.java @@ -49,10 +49,8 @@ public interface CassandraAdminOperations extends CassandraOperations { Map optionsByName); /** - * Drops a table based on the given {@link Class entity type}. - * - * The name of the table is derived from either the simple name of the {@link Class entity class} - * or name of the table specified with the {@link Table} mapping annotation. + * Drops a table based on the given {@link Class entity type}. The name of the table is derived from either the simple + * name of the {@link Class entity class} or name of the table specified with the {@link Table} mapping annotation. * * @param entityType {@link Class type} of the entity for which the table will be dropped. */ @@ -69,8 +67,7 @@ public interface CassandraAdminOperations extends CassandraOperations { /** * Drops the {@link String named} table. * - * @param ifExists If {@literal true}, will only drop the table if it exists, - * else the drop operation will be ignored. + * @param ifExists If {@literal true}, will only drop the table if it exists, else the drop operation will be ignored. * @param tableName {@link String Name} of the table to drop. * @since 2.1 */ diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/CassandraAdminTemplate.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/CassandraAdminTemplate.java index ff93898f8..9aa409465 100644 --- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/CassandraAdminTemplate.java +++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/CassandraAdminTemplate.java @@ -103,8 +103,7 @@ public class CassandraAdminTemplate extends CassandraTemplate implements Cassand @Override public void dropTable(boolean ifExists, CqlIdentifier tableName) { - String dropTableCql = - DropTableCqlGenerator.toCql(DropTableSpecification.dropTable(tableName).ifExists(ifExists)); + String dropTableCql = DropTableCqlGenerator.toCql(DropTableSpecification.dropTable(tableName).ifExists(ifExists)); getCqlOperations().execute(dropTableCql); } @@ -117,8 +116,7 @@ public class CassandraAdminTemplate extends CassandraTemplate implements Cassand Assert.notNull(typeName, "Type name must not be null"); - String dropUserTypeCql = - DropUserTypeCqlGenerator.toCql(DropUserTypeSpecification.dropType(typeName)); + String dropUserTypeCql = DropUserTypeCqlGenerator.toCql(DropUserTypeSpecification.dropType(typeName)); getCqlOperations().execute(dropUserTypeCql); } diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/CassandraBatchTemplate.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/CassandraBatchTemplate.java index fb07c10b2..b86c239db 100644 --- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/CassandraBatchTemplate.java +++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/CassandraBatchTemplate.java @@ -72,8 +72,8 @@ class CassandraBatchTemplate implements CassandraBatchOperations { } /** - * Return a reference to the configured {@link CassandraConverter} used to map {@link Object Objects} - * to {@link com.datastax.driver.core.Row Rows}. + * Return a reference to the configured {@link CassandraConverter} used to map {@link Object Objects} to + * {@link com.datastax.driver.core.Row Rows}. * * @return a reference to the configured {@link CassandraConverter}. * @see org.springframework.data.cassandra.core.convert.CassandraConverter @@ -83,8 +83,8 @@ class CassandraBatchTemplate implements CassandraBatchOperations { } /** - * Returns a reference to the configured {@link CassandraMappingContext} used to map entities to Cassandra tables - * and back. + * Returns a reference to the configured {@link CassandraMappingContext} used to map entities to Cassandra tables and + * back. * * @return a reference to the configured {@link CassandraMappingContext}. * @see org.springframework.data.cassandra.core.mapping.CassandraMappingContext @@ -94,8 +94,8 @@ class CassandraBatchTemplate implements CassandraBatchOperations { } /** - * Return a reference to the configured {@link StatementFactory} used to create Cassandra {@link Statement} objects - * to perform data access operations on a Cassandra cluster. + * Return a reference to the configured {@link StatementFactory} used to create Cassandra {@link Statement} objects to + * perform data access operations on a Cassandra cluster. * * @return a reference to the configured {@link StatementFactory}. * @see org.springframework.data.cassandra.core.StatementFactory @@ -166,11 +166,11 @@ class CassandraBatchTemplate implements CassandraBatchOperations { Assert.notNull(entity, "Entity must not be null"); - BasicCassandraPersistentEntity persistentEntity = - mappingContext.getRequiredPersistentEntity(entity.getClass()); + BasicCassandraPersistentEntity persistentEntity = mappingContext + .getRequiredPersistentEntity(entity.getClass()); - Insert insertQuery = EntityQueryUtils.createInsertQuery(persistentEntity.getTableName().toCql(), - entity, options, getConverter(), persistentEntity); + Insert insertQuery = EntityQueryUtils.createInsertQuery(persistentEntity.getTableName().toCql(), entity, options, + getConverter(), persistentEntity); this.batch.add(insertQuery); } @@ -214,8 +214,8 @@ class CassandraBatchTemplate implements CassandraBatchOperations { CassandraPersistentEntity persistentEntity = getRequiredPersistentEntity(entity.getClass()); - Update update = getStatementFactory() - .update(entity, options, getConverter(), persistentEntity, persistentEntity.getTableName()); + Update update = getStatementFactory().update(entity, options, getConverter(), persistentEntity, + persistentEntity.getTableName()); this.batch.add(update); } @@ -259,8 +259,8 @@ class CassandraBatchTemplate implements CassandraBatchOperations { CassandraPersistentEntity persistentEntity = getRequiredPersistentEntity(entity.getClass()); - Delete delete = getStatementFactory() - .delete(entity, options, this.converter, persistentEntity, persistentEntity.getTableName()); + Delete delete = getStatementFactory().delete(entity, options, this.converter, persistentEntity, + persistentEntity.getTableName()); this.batch.add(delete); } diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/CassandraPersistentEntitySchemaCreator.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/CassandraPersistentEntitySchemaCreator.java index 79e5a02ea..daea2d230 100644 --- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/CassandraPersistentEntitySchemaCreator.java +++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/CassandraPersistentEntitySchemaCreator.java @@ -145,8 +145,8 @@ public class CassandraPersistentEntitySchemaCreator { */ protected List createUserTypeSpecifications(boolean ifNotExists) { - Collection> entities = - new ArrayList<>(this.mappingContext.getUserDefinedTypeEntities()); + Collection> entities = new ArrayList<>( + this.mappingContext.getUserDefinedTypeEntities()); Map> byTableName = entities.stream() .collect(Collectors.toMap(CassandraPersistentEntity::getTableName, entity -> entity)); @@ -166,9 +166,10 @@ public class CassandraPersistentEntitySchemaCreator { Collections.reverse(ordered); - specifications.addAll(ordered.stream().filter(created::add).map(identifier -> - this.mappingContext.getCreateUserTypeSpecificationFor(byTableName.get(identifier)).ifNotExists(ifNotExists)) - .collect(Collectors.toList())); + specifications.addAll(ordered + .stream().filter(created::add).map(identifier -> this.mappingContext + .getCreateUserTypeSpecificationFor(byTableName.get(identifier)).ifNotExists(ifNotExists)) + .collect(Collectors.toList())); }); return specifications; diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/CassandraTemplate.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/CassandraTemplate.java index 2b130239c..9d9cf9a76 100644 --- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/CassandraTemplate.java +++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/CassandraTemplate.java @@ -15,14 +15,14 @@ */ package org.springframework.data.cassandra.core; +import lombok.Value; + import java.util.List; import java.util.function.Consumer; import java.util.function.Function; import java.util.stream.Stream; import java.util.stream.StreamSupport; -import lombok.Value; - import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.ApplicationEventPublisherAware; @@ -204,8 +204,8 @@ public class CassandraTemplate implements CassandraOperations, ApplicationEventP } /** - * Returns the {@link EntityOperations} used to perform data access operations on an entity - * inside a Cassandra data source. + * Returns the {@link EntityOperations} used to perform data access operations on an entity inside a Cassandra data + * source. * * @return the configured {@link EntityOperations} for this template. * @see org.springframework.data.cassandra.core.EntityOperations @@ -367,8 +367,8 @@ public class CassandraTemplate implements CassandraOperations, ApplicationEventP CassandraPersistentEntity persistentEntity = getRequiredPersistentEntity(entityClass); - Columns columns = getStatementFactory() - .computeColumnsForProjection(query.getColumns(), persistentEntity, returnType); + Columns columns = getStatementFactory().computeColumnsForProjection(query.getColumns(), persistentEntity, + returnType); Query queryToUse = query.columns(columns); @@ -418,13 +418,12 @@ public class CassandraTemplate implements CassandraOperations, ApplicationEventP Stream doStream(Query query, Class entityClass, CqlIdentifier tableName, Class returnType) { - RegularStatement statement = getStatementFactory() - .select(query, getRequiredPersistentEntity(entityClass), tableName); + RegularStatement statement = getStatementFactory().select(query, getRequiredPersistentEntity(entityClass), + tableName); ResultSet resultSet = getCqlOperations().queryForResultSet(statement); - return StreamSupport.stream(resultSet.spliterator(), false) - .map(getMapper(entityClass, returnType, tableName)); + return StreamSupport.stream(resultSet.spliterator(), false).map(getMapper(entityClass, returnType, tableName)); } /* (non-Javadoc) @@ -438,8 +437,7 @@ public class CassandraTemplate implements CassandraOperations, ApplicationEventP Assert.notNull(update, "Update must not be null"); Assert.notNull(entityClass, "Entity type must not be null"); - Statement updateStatement = getStatementFactory() - .update(query, update, getRequiredPersistentEntity(entityClass)); + Statement updateStatement = getStatementFactory().update(query, update, getRequiredPersistentEntity(entityClass)); return getCqlOperations().execute(updateStatement); } @@ -448,8 +446,8 @@ public class CassandraTemplate implements CassandraOperations, ApplicationEventP WriteResult doUpdate(Query query, org.springframework.data.cassandra.core.query.Update update, Class entityClass, CqlIdentifier tableName) { - RegularStatement updateStatement = getStatementFactory() - .update(query, update, getRequiredPersistentEntity(entityClass), tableName); + RegularStatement updateStatement = getStatementFactory().update(query, update, + getRequiredPersistentEntity(entityClass), tableName); return getCqlOperations().execute(new StatementCallback(updateStatement)); } @@ -515,8 +513,8 @@ public class CassandraTemplate implements CassandraOperations, ApplicationEventP long doCount(Query query, Class entityClass, CqlIdentifier tableName) { - RegularStatement countStatement = getStatementFactory() - .count(query, getRequiredPersistentEntity(entityClass), tableName); + RegularStatement countStatement = getStatementFactory().count(query, getRequiredPersistentEntity(entityClass), + tableName); Long count = getCqlOperations().queryForObject(countStatement, Long.class); @@ -555,8 +553,8 @@ public class CassandraTemplate implements CassandraOperations, ApplicationEventP boolean doExists(Query query, Class entityClass, CqlIdentifier tableName) { - RegularStatement select = getStatementFactory() - .select(query.limit(1), getRequiredPersistentEntity(entityClass), tableName); + RegularStatement select = getStatementFactory().select(query.limit(1), getRequiredPersistentEntity(entityClass), + tableName); return getCqlOperations().queryForResultSet(select).iterator().hasNext(); } @@ -613,8 +611,7 @@ public class CassandraTemplate implements CassandraOperations, ApplicationEventP Insert insert = EntityQueryUtils.createInsertQuery(tableName.toCql(), entityToUse, options, getConverter(), persistentEntity); - return source.isVersionedEntity() - ? doInsertVersioned(insert.ifNotExists(), entityToUse, source, tableName) + return source.isVersionedEntity() ? doInsertVersioned(insert.ifNotExists(), entityToUse, source, tableName) : doInsert(insert, entityToUse, tableName); } @@ -625,8 +622,8 @@ public class CassandraTemplate implements CassandraOperations, ApplicationEventP if (!result.wasApplied()) { throw new OptimisticLockingFailureException( - String.format("Cannot insert entity %s with version %s into table %s as it already exists", - entity, source.getVersion(), tableName)); + String.format("Cannot insert entity %s with version %s into table %s as it already exists", entity, + source.getVersion(), tableName)); } }); } @@ -656,8 +653,7 @@ public class CassandraTemplate implements CassandraOperations, ApplicationEventP CassandraPersistentEntity persistentEntity = getRequiredPersistentEntity(entity.getClass()); CqlIdentifier tableName = persistentEntity.getTableName(); - return source.isVersionedEntity() - ? doUpdateVersioned(source, options, tableName, persistentEntity) + return source.isVersionedEntity() ? doUpdateVersioned(source, options, tableName, persistentEntity) : doUpdate(entity, options, tableName, persistentEntity); } @@ -674,8 +670,8 @@ public class CassandraTemplate implements CassandraOperations, ApplicationEventP if (!result.wasApplied()) { throw new OptimisticLockingFailureException( - String.format("Cannot save entity %s with version %s to table %s. Has it been modified meanwhile?", - entity, source.getVersion(), tableName)); + String.format("Cannot save entity %s with version %s to table %s. Has it been modified meanwhile?", entity, + source.getVersion(), tableName)); } }); } @@ -711,9 +707,8 @@ public class CassandraTemplate implements CassandraOperations, ApplicationEventP Delete delete = getStatementFactory().delete(entity, options, getConverter(), persistentEntity, tableName); - return source.isVersionedEntity() - ? doDeleteVersioned(delete, entity, source, tableName) - : doDelete(delete, entity, tableName); + return source.isVersionedEntity() ? doDeleteVersioned(delete, entity, source, tableName) + : doDelete(delete, entity, tableName); } private WriteResult doDeleteVersioned(Delete delete, Object entity, AdaptibleEntity source, diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/DeleteOptions.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/DeleteOptions.java index 45a86d755..6c7e802c2 100644 --- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/DeleteOptions.java +++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/DeleteOptions.java @@ -15,12 +15,12 @@ */ package org.springframework.data.cassandra.core; +import lombok.EqualsAndHashCode; + import java.time.Duration; import java.time.Instant; import java.util.concurrent.TimeUnit; -import lombok.EqualsAndHashCode; - import org.springframework.data.cassandra.core.cql.WriteOptions; import org.springframework.data.cassandra.core.query.CriteriaDefinition; import org.springframework.data.cassandra.core.query.Filter; @@ -299,8 +299,8 @@ public class DeleteOptions extends WriteOptions { */ public DeleteOptions build() { - return new DeleteOptions(this.consistencyLevel, this.retryPolicy, this.tracing, this.fetchSize, - this.readTimeout, this.ttl, this.timestamp, this.ifExists, this.ifCondition); + return new DeleteOptions(this.consistencyLevel, this.retryPolicy, this.tracing, this.fetchSize, this.readTimeout, + this.ttl, this.timestamp, this.ifExists, this.ifCondition); } } } diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/EntityOperations.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/EntityOperations.java index af773bc07..635442d83 100644 --- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/EntityOperations.java +++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/EntityOperations.java @@ -49,8 +49,7 @@ import com.datastax.driver.core.querybuilder.Update; @RequiredArgsConstructor class EntityOperations { - @NonNull @Getter(AccessLevel.PROTECTED) - private final MappingContext, CassandraPersistentProperty> mappingContext; + @NonNull @Getter(AccessLevel.PROTECTED) private final MappingContext, CassandraPersistentProperty> mappingContext; /** * Creates a new {@link Entity} for the given bean. @@ -251,8 +250,7 @@ class EntityOperations { PersistentPropertyAccessor propertyAccessor = entity.getPropertyAccessor(bean); - return new AdaptibleMappedEntity<>(entity, - new ConvertingPropertyAccessor<>(propertyAccessor, conversionService)); + return new AdaptibleMappedEntity<>(entity, new ConvertingPropertyAccessor<>(propertyAccessor, conversionService)); } private AdaptibleMappedEntity(CassandraPersistentEntity entity, ConvertingPropertyAccessor propertyAccessor) { diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ExecutableDeleteOperation.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ExecutableDeleteOperation.java index d7820e421..bb85062e5 100644 --- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ExecutableDeleteOperation.java +++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ExecutableDeleteOperation.java @@ -122,8 +122,7 @@ public interface ExecutableDeleteOperation { } /** - * the {@link ExecutableDelete} interface provides methods for constructing {@code DELETE} operations - * in a fluent way. + * the {@link ExecutableDelete} interface provides methods for constructing {@code DELETE} operations in a fluent way. */ interface ExecutableDelete extends DeleteWithTable, DeleteWithQuery {} diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ExecutableDeleteOperationSupport.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ExecutableDeleteOperationSupport.java index 48e236433..47ea7ba7b 100644 --- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ExecutableDeleteOperationSupport.java +++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ExecutableDeleteOperationSupport.java @@ -53,7 +53,7 @@ class ExecutableDeleteOperationSupport implements ExecutableDeleteOperation { // While the use of final fields and construction on mutation effectively makes this class Thread-safe, // it is possible this implementation could generate a high-level of young-gen garbage on the JVM heap, // particularly if the template delete(..) (and this class) are used inside of a loop for a large number - // of domain types. Of course, this assumption is highly contingent on the user's `Query` + // of domain types. Of course, this assumption is highly contingent on the user's `Query` // in addition to his/her application design. @RequiredArgsConstructor diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ExecutableInsertOperation.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ExecutableInsertOperation.java index 3995e2d55..2f645977b 100644 --- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ExecutableInsertOperation.java +++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ExecutableInsertOperation.java @@ -123,8 +123,7 @@ public interface ExecutableInsertOperation { } /** - * The {@link ExecutableInsert} interface provides methods for constructing {@code INSERT} operations - * in a fluent way. + * The {@link ExecutableInsert} interface provides methods for constructing {@code INSERT} operations in a fluent way. */ interface ExecutableInsert extends InsertWithTable {} diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ExecutableInsertOperationSupport.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ExecutableInsertOperationSupport.java index 1b3e85ded..08bb8de4c 100644 --- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ExecutableInsertOperationSupport.java +++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ExecutableInsertOperationSupport.java @@ -51,7 +51,7 @@ class ExecutableInsertOperationSupport implements ExecutableInsertOperation { // While the use of final fields and construction on mutation effectively makes this class Thread-safe, // it is possible this implementation could generate a high-level of young-gen garbage on the JVM heap, // particularly if the template insert(..) (and this class) are used inside of a loop for a large number - // of domain types. Of course, this assumption is highly contingent on the user's application design. + // of domain types. Of course, this assumption is highly contingent on the user's application design. @RequiredArgsConstructor @FieldDefaults(level = AccessLevel.PRIVATE, makeFinal = true) diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ExecutableSelectOperation.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ExecutableSelectOperation.java index 434035391..cbe689932 100644 --- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ExecutableSelectOperation.java +++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ExecutableSelectOperation.java @@ -33,9 +33,9 @@ import org.springframework.util.Assert; * the result from the {@link com.datastax.driver.core.Row}. However, it is possible to define an different * {@literal returnType} via {@code as} for mapping the result. *

- * By default, the table to operate on is derived from the initial {@literal domainType} and can be defined there - * with the {@link org.springframework.data.cassandra.core.mapping.Table} annotation as well. Using {@code inTable} - * allows a user to override the table name for the execution. + * By default, the table to operate on is derived from the initial {@literal domainType} and can be defined there with + * the {@link org.springframework.data.cassandra.core.mapping.Table} annotation as well. Using {@code inTable} allows a + * user to override the table name for the execution. * *

  *     
@@ -211,8 +211,8 @@ public interface ExecutableSelectOperation {
 		/**
 		 * Stream all matching elements.
 		 *
-		 * @return a {@link Stream} wrapping the Cassandra {@link com.datastax.driver.core.ResultSet},
-		 * which needs to be closed; never {@literal null}.
+		 * @return a {@link Stream} wrapping the Cassandra {@link com.datastax.driver.core.ResultSet}, which needs to be
+		 *         closed; never {@literal null}.
 		 * @see java.util.stream.Stream
 		 * @see #all()
 		 */
@@ -222,8 +222,8 @@ public interface ExecutableSelectOperation {
 	}
 
 	/**
-	 * The {@link ExecutableSelect} interface provides methods for constructing {@code SELECT} query operations
-	 * in a fluent way.
+	 * The {@link ExecutableSelect} interface provides methods for constructing {@code SELECT} query operations in a
+	 * fluent way.
 	 */
 	interface ExecutableSelect extends SelectWithTable, SelectWithProjection {}
 
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ExecutableSelectOperationSupport.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ExecutableSelectOperationSupport.java
index 57a6a3a1e..298159205 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ExecutableSelectOperationSupport.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ExecutableSelectOperationSupport.java
@@ -15,14 +15,14 @@
  */
 package org.springframework.data.cassandra.core;
 
-import java.util.List;
-import java.util.stream.Stream;
-
 import lombok.AccessLevel;
 import lombok.NonNull;
 import lombok.RequiredArgsConstructor;
 import lombok.experimental.FieldDefaults;
 
+import java.util.List;
+import java.util.stream.Stream;
+
 import org.springframework.dao.IncorrectResultSizeDataAccessException;
 import org.springframework.data.cassandra.core.cql.CqlIdentifier;
 import org.springframework.data.cassandra.core.query.Query;
@@ -58,7 +58,7 @@ class ExecutableSelectOperationSupport implements ExecutableSelectOperation {
 	// While the use of final fields and construction on mutation effectively makes this class Thread-safe,
 	// it is possible this implementation could generate a high-level of young-gen garbage on the JVM heap,
 	// particularly if the template query(..) (and this class) are used inside of a loop for a large number
-	// of domain types.  Of course, this assumption is highly contingent on the user's `Query`
+	// of domain types. Of course, this assumption is highly contingent on the user's `Query`
 	// in addition to his/her application design.
 
 	@RequiredArgsConstructor
@@ -83,8 +83,7 @@ class ExecutableSelectOperationSupport implements ExecutableSelectOperation {
 
 			Assert.notNull(tableName, "Table name must not be null");
 
-			return new ExecutableSelectSupport<>(this.template, this.domainType, this.returnType,
-					this.query, tableName);
+			return new ExecutableSelectSupport<>(this.template, this.domainType, this.returnType, this.query, tableName);
 		}
 
 		/* (non-Javadoc)
@@ -95,8 +94,7 @@ class ExecutableSelectOperationSupport implements ExecutableSelectOperation {
 
 			Assert.notNull(returnType, "ReturnType must not be null");
 
-			return new ExecutableSelectSupport<>(this.template, this.domainType, returnType,
-					this.query, this.tableName);
+			return new ExecutableSelectSupport<>(this.template, this.domainType, returnType, this.query, this.tableName);
 		}
 
 		/* (non-Javadoc)
@@ -107,8 +105,7 @@ class ExecutableSelectOperationSupport implements ExecutableSelectOperation {
 
 			Assert.notNull(query, "Query must not be null");
 
-			return new ExecutableSelectSupport<>(this.template, this.domainType, this.returnType,
-					query, this.tableName);
+			return new ExecutableSelectSupport<>(this.template, this.domainType, this.returnType, query, this.tableName);
 		}
 
 		/* (non-Javadoc)
@@ -133,8 +130,7 @@ class ExecutableSelectOperationSupport implements ExecutableSelectOperation {
 		@Override
 		public T firstValue() {
 
-			List result =
-					this.template.doSelect(this.query.limit(1), this.domainType, getTableName(), this.returnType);
+			List result = this.template.doSelect(this.query.limit(1), this.domainType, getTableName(), this.returnType);
 
 			return ObjectUtils.isEmpty(result) ? null : result.iterator().next();
 		}
@@ -145,8 +141,7 @@ class ExecutableSelectOperationSupport implements ExecutableSelectOperation {
 		@Override
 		public T oneValue() {
 
-			List result =
-					this.template.doSelect(this.query.limit(2), this.domainType, getTableName(), this.returnType);
+			List result = this.template.doSelect(this.query.limit(2), this.domainType, getTableName(), this.returnType);
 
 			if (ObjectUtils.isEmpty(result)) {
 				return null;
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ExecutableUpdateOperation.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ExecutableUpdateOperation.java
index 66cb856b9..d21d29b9f 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ExecutableUpdateOperation.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ExecutableUpdateOperation.java
@@ -21,14 +21,14 @@ import org.springframework.data.cassandra.core.query.Update;
 import org.springframework.util.Assert;
 
 /**
- * {@link ExecutableUpdateOperation} allows creation and execution of Cassandra {@code UPDATE} operation
- * in a fluent API style.
+ * {@link ExecutableUpdateOperation} allows creation and execution of Cassandra {@code UPDATE} operation in a fluent API
+ * style.
  * 

- * The starting {@literal domainType} is used for mapping the {@link Query} provided via {@code matching}, - * as well as the {@link Update} provided via {@code apply} into the Cassandra specific representations. - * The table to operate on is by default derived from the initial {@literal domainType} and can be defined - * there via {@link org.springframework.data.cassandra.core.mapping.Table}. Using {@code inTable} allows - * the developer to override the table name for the execution. + * The starting {@literal domainType} is used for mapping the {@link Query} provided via {@code matching}, as well as + * the {@link Update} provided via {@code apply} into the Cassandra specific representations. The table to operate on is + * by default derived from the initial {@literal domainType} and can be defined there via + * {@link org.springframework.data.cassandra.core.mapping.Table}. Using {@code inTable} allows the developer to override + * the table name for the execution. * *

  *     
@@ -131,8 +131,7 @@ public interface ExecutableUpdateOperation {
 	}
 
 	/**
-	 * The {@link ExecutableUpdate} interface provides methods for constructing {@code UPDATE} operations
-	 * in a fluent way.
+	 * The {@link ExecutableUpdate} interface provides methods for constructing {@code UPDATE} operations in a fluent way.
 	 */
 	interface ExecutableUpdate extends UpdateWithTable, UpdateWithQuery {}
 
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ExecutableUpdateOperationSupport.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ExecutableUpdateOperationSupport.java
index bf1471c0f..3018683db 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ExecutableUpdateOperationSupport.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ExecutableUpdateOperationSupport.java
@@ -55,7 +55,7 @@ class ExecutableUpdateOperationSupport implements ExecutableUpdateOperation {
 	// While the use of final fields and construction on mutation effectively makes this class Thread-safe,
 	// it is possible this implementation could generate a high-level of young-gen garbage on the JVM heap,
 	// particularly if the template update(..) (and this class) are used inside of a loop for a large number
-	// of domain types.  Of course, this assumption is highly contingent on the user's `Query`
+	// of domain types. Of course, this assumption is highly contingent on the user's `Query`
 	// in addition to his/her application design.
 
 	@RequiredArgsConstructor
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveCassandraBatchTemplate.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveCassandraBatchTemplate.java
index db80a4e53..1360dc95b 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveCassandraBatchTemplate.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveCassandraBatchTemplate.java
@@ -15,6 +15,9 @@
  */
 package org.springframework.data.cassandra.core;
 
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
@@ -23,9 +26,6 @@ import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.function.Function;
 
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
 import org.springframework.data.cassandra.core.convert.CassandraConverter;
 import org.springframework.data.cassandra.core.convert.UpdateMapper;
 import org.springframework.data.cassandra.core.cql.WriteOptions;
@@ -86,8 +86,8 @@ class ReactiveCassandraBatchTemplate implements ReactiveCassandraBatchOperations
 	}
 
 	/**
-	 * Return a reference to the configured {@link CassandraConverter} used to map {@link Object Objects}
-	 * to {@link com.datastax.driver.core.Row Rows}.
+	 * Return a reference to the configured {@link CassandraConverter} used to map {@link Object Objects} to
+	 * {@link com.datastax.driver.core.Row Rows}.
 	 *
 	 * @return a reference to the configured {@link CassandraConverter}.
 	 * @see org.springframework.data.cassandra.core.convert.CassandraConverter
@@ -97,8 +97,8 @@ class ReactiveCassandraBatchTemplate implements ReactiveCassandraBatchOperations
 	}
 
 	/**
-	 * Returns a reference to the configured {@link CassandraMappingContext} used to map entities to Cassandra tables
-	 * and back.
+	 * Returns a reference to the configured {@link CassandraMappingContext} used to map entities to Cassandra tables and
+	 * back.
 	 *
 	 * @return a reference to the configured {@link CassandraMappingContext}.
 	 * @see org.springframework.data.cassandra.core.mapping.CassandraMappingContext
@@ -112,8 +112,8 @@ class ReactiveCassandraBatchTemplate implements ReactiveCassandraBatchOperations
 	}
 
 	/**
-	 * Return a reference to the configured {@link StatementFactory} used to create Cassandra {@link Statement} objects
-	 * to perform data access operations on a Cassandra cluster.
+	 * Return a reference to the configured {@link StatementFactory} used to create Cassandra {@link Statement} objects to
+	 * perform data access operations on a Cassandra cluster.
 	 *
 	 * @return a reference to the configured {@link StatementFactory}.
 	 * @see org.springframework.data.cassandra.core.StatementFactory
@@ -231,11 +231,11 @@ class ReactiveCassandraBatchTemplate implements ReactiveCassandraBatchOperations
 
 			Assert.notNull(entity, "Entity must not be null");
 
-			BasicCassandraPersistentEntity persistentEntity =
-					mappingContext.getRequiredPersistentEntity(entity.getClass());
+			BasicCassandraPersistentEntity persistentEntity = mappingContext
+					.getRequiredPersistentEntity(entity.getClass());
 
-			Insert insertQuery = EntityQueryUtils.createInsertQuery(persistentEntity.getTableName().toCql(),
-					entity, options, converter, persistentEntity);
+			Insert insertQuery = EntityQueryUtils.createInsertQuery(persistentEntity.getTableName().toCql(), entity, options,
+					converter, persistentEntity);
 
 			insertQueries.add(insertQuery);
 		}
@@ -313,8 +313,8 @@ class ReactiveCassandraBatchTemplate implements ReactiveCassandraBatchOperations
 
 			CassandraPersistentEntity persistentEntity = getRequiredPersistentEntity(entity.getClass());
 
-			Update update = getStatementFactory()
-					.update(entity, options, converter, persistentEntity, persistentEntity.getTableName());
+			Update update = getStatementFactory().update(entity, options, converter, persistentEntity,
+					persistentEntity.getTableName());
 
 			updateQueries.add(update);
 		}
@@ -392,8 +392,8 @@ class ReactiveCassandraBatchTemplate implements ReactiveCassandraBatchOperations
 
 			CassandraPersistentEntity persistentEntity = getRequiredPersistentEntity(entity.getClass());
 
-			Delete delete = getStatementFactory()
-					.delete(entity, options, converter, persistentEntity, persistentEntity.getTableName());
+			Delete delete = getStatementFactory().delete(entity, options, converter, persistentEntity,
+					persistentEntity.getTableName());
 
 			deleteQueries.add(delete);
 		}
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveCassandraTemplate.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveCassandraTemplate.java
index ef41e98b6..f2aa2b2a2 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveCassandraTemplate.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveCassandraTemplate.java
@@ -15,17 +15,17 @@
  */
 package org.springframework.data.cassandra.core;
 
-import java.util.Collections;
-import java.util.function.BiConsumer;
-import java.util.function.Function;
-
 import lombok.Value;
-
 import reactor.core.publisher.Flux;
 import reactor.core.publisher.Mono;
 import reactor.core.publisher.SynchronousSink;
 
+import java.util.Collections;
+import java.util.function.BiConsumer;
+import java.util.function.Function;
+
 import org.reactivestreams.Publisher;
+
 import org.springframework.context.ApplicationEvent;
 import org.springframework.context.ApplicationEventPublisher;
 import org.springframework.context.ApplicationEventPublisherAware;
@@ -198,8 +198,8 @@ public class ReactiveCassandraTemplate implements ReactiveCassandraOperations, A
 	}
 
 	/**
-	 * Returns the {@link EntityOperations} used to perform data access operations on an entity
-	 * inside a Cassandra data source.
+	 * Returns the {@link EntityOperations} used to perform data access operations on an entity inside a Cassandra data
+	 * source.
 	 *
 	 * @return the configured {@link EntityOperations} for this template.
 	 * @see org.springframework.data.cassandra.core.EntityOperations
@@ -310,17 +310,15 @@ public class ReactiveCassandraTemplate implements ReactiveCassandraOperations, A
 		Mono effectiveFetchSizeMono = getEffectiveFetchSize(statement);
 		RowMapper rowMapper = (row, i) -> getConverter().read(entityClass, row);
 
-		return resultSetMono.zipWith(effectiveFetchSizeMono)
-				.flatMap(tuple -> {
+		return resultSetMono.zipWith(effectiveFetchSizeMono).flatMap(tuple -> {
 
-					ReactiveResultSet resultSet = tuple.getT1();
-					Integer effectiveFetchSize = tuple.getT2();
+			ReactiveResultSet resultSet = tuple.getT1();
+			Integer effectiveFetchSize = tuple.getT2();
 
-					return resultSet.availableRows().collectList().map(it ->
-							EntityQueryUtils.readSlice(it, resultSet.getExecutionInfo().getPagingState(), rowMapper,
-								1, effectiveFetchSize));
+			return resultSet.availableRows().collectList().map(it -> EntityQueryUtils.readSlice(it,
+					resultSet.getExecutionInfo().getPagingState(), rowMapper, 1, effectiveFetchSize));
 
-				}).defaultIfEmpty(new SliceImpl<>(Collections.emptyList()));
+		}).defaultIfEmpty(new SliceImpl<>(Collections.emptyList()));
 	}
 
 	// -------------------------------------------------------------------------
@@ -343,8 +341,8 @@ public class ReactiveCassandraTemplate implements ReactiveCassandraOperations, A
 
 		CassandraPersistentEntity persistentEntity = getRequiredPersistentEntity(entityClass);
 
-		Columns columns = getStatementFactory()
-				.computeColumnsForProjection(query.getColumns(), persistentEntity, returnType);
+		Columns columns = getStatementFactory().computeColumnsForProjection(query.getColumns(), persistentEntity,
+				returnType);
 
 		Query queryToUse = query.columns(columns);
 
@@ -398,8 +396,8 @@ public class ReactiveCassandraTemplate implements ReactiveCassandraOperations, A
 	Mono doUpdate(Query query, org.springframework.data.cassandra.core.query.Update update,
 			Class entityClass, CqlIdentifier tableName) {
 
-		RegularStatement statement = getStatementFactory()
-				.update(query, update, getRequiredPersistentEntity(entityClass), tableName);
+		RegularStatement statement = getStatementFactory().update(query, update, getRequiredPersistentEntity(entityClass),
+				tableName);
 
 		return getReactiveCqlOperations().execute(new StatementCallback(statement)).next();
 	}
@@ -418,8 +416,7 @@ public class ReactiveCassandraTemplate implements ReactiveCassandraOperations, A
 
 	Mono doDelete(Query query, Class entityClass, CqlIdentifier tableName) {
 
-		RegularStatement delete = getStatementFactory()
-				.delete(query, getRequiredPersistentEntity(entityClass), tableName);
+		RegularStatement delete = getStatementFactory().delete(query, getRequiredPersistentEntity(entityClass), tableName);
 
 		Mono writeResult = getReactiveCqlOperations().execute(new StatementCallback(delete))
 				.doOnSubscribe(it -> maybeEmitEvent(new BeforeDeleteEvent<>(delete, entityClass, tableName))).next();
@@ -495,8 +492,8 @@ public class ReactiveCassandraTemplate implements ReactiveCassandraOperations, A
 
 	Mono doExists(Query query, Class entityClass, CqlIdentifier tableName) {
 
-		RegularStatement select = getStatementFactory()
-				.select(query.limit(1), getRequiredPersistentEntity(entityClass), tableName);
+		RegularStatement select = getStatementFactory().select(query.limit(1), getRequiredPersistentEntity(entityClass),
+				tableName);
 
 		return getReactiveCqlOperations().queryForRows(select).hasElements();
 	}
@@ -549,8 +546,7 @@ public class ReactiveCassandraTemplate implements ReactiveCassandraOperations, A
 		Insert insert = EntityQueryUtils.createInsertQuery(tableName.toCql(), entityToUse, options, getConverter(),
 				persistentEntity);
 
-		return source.isVersionedEntity()
-				? doInsertVersioned(insert.ifNotExists(), entityToUse, source, tableName)
+		return source.isVersionedEntity() ? doInsertVersioned(insert.ifNotExists(), entityToUse, source, tableName)
 				: doInsert(insert, entityToUse, tableName);
 	}
 
@@ -562,8 +558,8 @@ public class ReactiveCassandraTemplate implements ReactiveCassandraOperations, A
 			if (!result.wasApplied()) {
 
 				sink.error(new OptimisticLockingFailureException(
-						String.format("Cannot insert entity %s with version %s into table %s as it already exists",
-								entity, source.getVersion(), tableName)));
+						String.format("Cannot insert entity %s with version %s into table %s as it already exists", entity,
+								source.getVersion(), tableName)));
 
 				return;
 			}
@@ -597,8 +593,7 @@ public class ReactiveCassandraTemplate implements ReactiveCassandraOperations, A
 		CassandraPersistentEntity persistentEntity = getRequiredPersistentEntity(entity.getClass());
 		CqlIdentifier tableName = persistentEntity.getTableName();
 
-		return source.isVersionedEntity()
-				? doUpdateVersioned(source, options, tableName, persistentEntity)
+		return source.isVersionedEntity() ? doUpdateVersioned(source, options, tableName, persistentEntity)
 				: doUpdate(entity, options, tableName, persistentEntity);
 	}
 
@@ -616,8 +611,8 @@ public class ReactiveCassandraTemplate implements ReactiveCassandraOperations, A
 			if (!result.wasApplied()) {
 
 				sink.error(new OptimisticLockingFailureException(
-						String.format("Cannot save entity %s with version %s to table %s. Has it been modified meanwhile?",
-								entity, source.getVersion(), tableName)));
+						String.format("Cannot save entity %s with version %s to table %s. Has it been modified meanwhile?", entity,
+								source.getVersion(), tableName)));
 
 				return;
 			}
@@ -657,8 +652,7 @@ public class ReactiveCassandraTemplate implements ReactiveCassandraOperations, A
 
 		Delete delete = getStatementFactory().delete(entity, options, getConverter(), persistentEntity, tableName);
 
-		return source.isVersionedEntity()
-				? doDeleteVersioned(delete, entity, source, tableName)
+		return source.isVersionedEntity() ? doDeleteVersioned(delete, entity, source, tableName)
 				: doDelete(delete, entity, tableName);
 	}
 
@@ -806,8 +800,8 @@ public class ReactiveCassandraTemplate implements ReactiveCassandraOperations, A
 			}
 		}
 
-		return getReactiveCqlOperations().execute((ReactiveSessionCallback) session ->
-				Mono.just(session.getCluster().getConfiguration().getQueryOptions().getFetchSize())).single();
+		return getReactiveCqlOperations().execute((ReactiveSessionCallback) session -> Mono
+				.just(session.getCluster().getConfiguration().getQueryOptions().getFetchSize())).single();
 	}
 
 	@SuppressWarnings("unchecked")
@@ -821,9 +815,7 @@ public class ReactiveCassandraTemplate implements ReactiveCassandraOperations, A
 
 			Object source = getConverter().read(typeToRead, row);
 
-			T result = (T) (targetType.isInterface()
-					? getProjectionFactory().createProjection(targetType, source)
-					: source);
+			T result = (T) (targetType.isInterface() ? getProjectionFactory().createProjection(targetType, source) : source);
 
 			maybeEmitEvent(new AfterConvertEvent<>(row, result, tableName));
 
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveDeleteOperation.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveDeleteOperation.java
index cee8727d6..c32de8ef6 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveDeleteOperation.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveDeleteOperation.java
@@ -22,11 +22,11 @@ import org.springframework.data.cassandra.core.query.Query;
 import org.springframework.util.Assert;
 
 /**
- * The {@link ReactiveDeleteOperation} interface allows creation and execution of Cassandra {@code DELETE} operations
- * in a fluent API style.
+ * The {@link ReactiveDeleteOperation} interface allows creation and execution of Cassandra {@code DELETE} operations in
+ * a fluent API style.
  * 

- * The starting {@literal domainType} is used for mapping the {@link Query} provided via {@code matching} - * into the Cassandra specific representation. By default, the table to operate on is derived from the initial + * The starting {@literal domainType} is used for mapping the {@link Query} provided via {@code matching} into the + * Cassandra specific representation. By default, the table to operate on is derived from the initial * {@literal domainType} and can be defined there via {@link org.springframework.data.cassandra.core.mapping.Table} * annotation. Using {@code inTable} allows a developer to override the table name for the execution. * @@ -127,8 +127,7 @@ public interface ReactiveDeleteOperation { } /** - * The {@link ReactiveDelete} interface provides methods for constructing {@code DELETE} operations - * in a fluent way. + * The {@link ReactiveDelete} interface provides methods for constructing {@code DELETE} operations in a fluent way. */ interface ReactiveDelete extends DeleteWithTable, DeleteWithQuery {} diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveDeleteOperationSupport.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveDeleteOperationSupport.java index 743f65278..bd6fae199 100644 --- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveDeleteOperationSupport.java +++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveDeleteOperationSupport.java @@ -19,7 +19,6 @@ import lombok.AccessLevel; import lombok.NonNull; import lombok.RequiredArgsConstructor; import lombok.experimental.FieldDefaults; - import reactor.core.publisher.Mono; import org.springframework.data.cassandra.core.cql.CqlIdentifier; diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveInsertOperation.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveInsertOperation.java index 96ecf2027..67d14823f 100644 --- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveInsertOperation.java +++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveInsertOperation.java @@ -21,12 +21,12 @@ import org.springframework.data.cassandra.core.cql.CqlIdentifier; import org.springframework.util.Assert; /** - * The {@link ReactiveInsertOperation} interface allows creation and execution of Cassandra {@code INSERT} operations - * in a fluent API style. + * The {@link ReactiveInsertOperation} interface allows creation and execution of Cassandra {@code INSERT} operations in + * a fluent API style. *

- * By default,the table to operate on is derived from the initial {@link Class domainType} and can be defined - * there via {@link org.springframework.data.cassandra.core.mapping.Table} annotation. Using {@code inTable} - * allows a developer to override the table name for the execution. + * By default,the table to operate on is derived from the initial {@link Class domainType} and can be defined there via + * {@link org.springframework.data.cassandra.core.mapping.Table} annotation. Using {@code inTable} allows a developer to + * override the table name for the execution. * *

  *     
@@ -128,8 +128,7 @@ public interface ReactiveInsertOperation {
 	}
 
 	/**
-	 * The {@link ReactiveInsert} interface provides methods for constructing {@code INSERT} operations
-	 * in a fluent way.
+	 * The {@link ReactiveInsert} interface provides methods for constructing {@code INSERT} operations in a fluent way.
 	 */
 	interface ReactiveInsert extends InsertWithTable {}
 
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveSelectOperation.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveSelectOperation.java
index 32c53f65b..16a8e1319 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveSelectOperation.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveSelectOperation.java
@@ -23,8 +23,8 @@ import org.springframework.data.cassandra.core.query.Query;
 import org.springframework.util.Assert;
 
 /**
- * The {@link ReactiveSelectOperation} interface allows creation and execution of Cassandra {@code SELECT} operations
- * in a fluent API style.
+ * The {@link ReactiveSelectOperation} interface allows creation and execution of Cassandra {@code SELECT} operations in
+ * a fluent API style.
  * 

* The starting {@literal domainType} is used for mapping the {@link Query} provided via {@code matching} int the * Cassandra specific representation. By default, the originating {@literal domainType} is also used for mapping back @@ -32,8 +32,8 @@ import org.springframework.util.Assert; * {@literal returnType} via {@code as} to mapping the result. *

* By default, the table to operate on is derived from the initial {@literal domainType} and can be defined there via - * the {@link org.springframework.data.cassandra.core.mapping.Table} annotation. Using {@code inTable} allows - * a developer to override the table name for the execution. + * the {@link org.springframework.data.cassandra.core.mapping.Table} annotation. Using {@code inTable} allows a + * developer to override the table name for the execution. * *

  *     
@@ -155,8 +155,7 @@ public interface ReactiveSelectOperation {
 		/**
 		 * Check for the presence of matching elements.
 		 *
-		 * @return a {@link Mono} emitting {@literal true} if at least one matching element exists;
-		 * never {@literal null}.
+		 * @return a {@link Mono} emitting {@literal true} if at least one matching element exists; never {@literal null}.
 		 * @see reactor.core.publisher.Mono
 		 */
 		Mono exists();
@@ -189,8 +188,7 @@ public interface ReactiveSelectOperation {
 	}
 
 	/**
-	 * The {@link ReactiveSelect} interface provides methods for constructing {@code SELECT} operations
-	 * in a fluent way.
+	 * The {@link ReactiveSelect} interface provides methods for constructing {@code SELECT} operations in a fluent way.
 	 */
 	interface ReactiveSelect extends SelectWithTable, SelectWithProjection {}
 
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveSelectOperationSupport.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveSelectOperationSupport.java
index 12a3514c7..3d069a9a4 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveSelectOperationSupport.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveSelectOperationSupport.java
@@ -19,7 +19,6 @@ import lombok.AccessLevel;
 import lombok.NonNull;
 import lombok.RequiredArgsConstructor;
 import lombok.experimental.FieldDefaults;
-
 import reactor.core.publisher.Flux;
 import reactor.core.publisher.Mono;
 
@@ -130,8 +129,7 @@ class ReactiveSelectOperationSupport implements ReactiveSelectOperation {
 		@Override
 		public Mono one() {
 
-			Flux result =
-					this.template.doSelect(this.query.limit(2), this.domainType, getTableName(), this.returnType);
+			Flux result = this.template.doSelect(this.query.limit(2), this.domainType, getTableName(), this.returnType);
 
 			return result.collectList() //
 					.flatMap(it -> {
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveUpdateOperation.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveUpdateOperation.java
index 80596a5fc..f3adf7f22 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveUpdateOperation.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveUpdateOperation.java
@@ -23,15 +23,15 @@ import org.springframework.data.cassandra.core.query.Update;
 import org.springframework.util.Assert;
 
 /**
- * The {@link ReactiveUpdateOperation} interface allows creation and execution of Cassandra {@code UPDATE} operations
- * in a fluent API style.
+ * The {@link ReactiveUpdateOperation} interface allows creation and execution of Cassandra {@code UPDATE} operations in
+ * a fluent API style.
  * 

* The starting {@literal domainType} is used for mapping the {@link Query} provided via {@code matching}, as well as * the {@link Update} via {@code apply} into the Cassandra specific representations. *

- * By default, the table to operate on is derived from the initial {@literal domainType} and can be defined there - * via the {@link org.springframework.data.cassandra.core.mapping.Table} annotation. Using {@code inTable} allows - * a developer to override the table name for the execution. + * By default, the table to operate on is derived from the initial {@literal domainType} and can be defined there via + * the {@link org.springframework.data.cassandra.core.mapping.Table} annotation. Using {@code inTable} allows a + * developer to override the table name for the execution. * *

  *     
@@ -135,8 +135,7 @@ public interface ReactiveUpdateOperation {
 	}
 
 	/**
-	 * The {@link ReactiveUpdate} interface provides methods for constructing {@code UPDATE} operations
-	 * in a fluent way.
+	 * The {@link ReactiveUpdate} interface provides methods for constructing {@code UPDATE} operations in a fluent way.
 	 */
 	interface ReactiveUpdate extends UpdateWithTable, UpdateWithQuery {}
 
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveUpdateOperationSupport.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveUpdateOperationSupport.java
index d48d7f12b..e4b4a6196 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveUpdateOperationSupport.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/ReactiveUpdateOperationSupport.java
@@ -19,7 +19,6 @@ import lombok.AccessLevel;
 import lombok.NonNull;
 import lombok.RequiredArgsConstructor;
 import lombok.experimental.FieldDefaults;
-
 import reactor.core.publisher.Mono;
 
 import org.springframework.data.cassandra.core.cql.CqlIdentifier;
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/StatementFactory.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/StatementFactory.java
index b687c36ef..f07fd1bbb 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/StatementFactory.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/StatementFactory.java
@@ -358,8 +358,8 @@ public class StatementFactory {
 			EntityWriter entityWriter, CassandraPersistentEntity persistentEntity,
 			CqlIdentifier tableName) {
 
-		com.datastax.driver.core.querybuilder.Update update =
-				EntityQueryUtils.createUpdateQuery(tableName.toCql(), entity, options, entityWriter);
+		com.datastax.driver.core.querybuilder.Update update = EntityQueryUtils.createUpdateQuery(tableName.toCql(), entity,
+				options, entityWriter);
 
 		potentiallyApplyIfCondition(options, UpdateOptions.class, UpdateOptions::getIfCondition,
 				condition -> addIfCondition(condition, update, persistentEntity));
@@ -635,9 +635,9 @@ public class StatementFactory {
 
 		Predicate predicate = criteriaDefinition.getPredicate();
 
-		CriteriaDefinition.Operators predicateOperator =
-			CriteriaDefinition.Operators.from(predicate.getOperator().toString())
-				.orElseThrow(() -> new IllegalArgumentException(String.format("Unknown operator [%s]", predicate.getOperator())));
+		CriteriaDefinition.Operators predicateOperator = CriteriaDefinition.Operators
+				.from(predicate.getOperator().toString()).orElseThrow(
+						() -> new IllegalArgumentException(String.format("Unknown operator [%s]", predicate.getOperator())));
 
 		switch (predicateOperator) {
 
@@ -692,7 +692,7 @@ public class StatementFactory {
 				return QueryBuilder.containsKey(columnName, predicate.getValue());
 		}
 
-		throw new IllegalArgumentException(String.format("Criteria %s %s %s not supported",
-				columnName, predicate.getOperator(), predicate.getValue()));
+		throw new IllegalArgumentException(
+				String.format("Criteria %s %s %s not supported", columnName, predicate.getOperator(), predicate.getValue()));
 	}
 }
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/UpdateOptions.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/UpdateOptions.java
index 0ca59df93..e9784ebd4 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/UpdateOptions.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/UpdateOptions.java
@@ -15,12 +15,12 @@
  */
 package org.springframework.data.cassandra.core;
 
+import lombok.EqualsAndHashCode;
+
 import java.time.Duration;
 import java.time.Instant;
 import java.util.concurrent.TimeUnit;
 
-import lombok.EqualsAndHashCode;
-
 import org.springframework.data.cassandra.core.cql.WriteOptions;
 import org.springframework.data.cassandra.core.query.CriteriaDefinition;
 import org.springframework.data.cassandra.core.query.Filter;
@@ -307,8 +307,8 @@ public class UpdateOptions extends WriteOptions {
 		 */
 		public UpdateOptions build() {
 
-			return new UpdateOptions(this.consistencyLevel, this.retryPolicy, this.tracing, this.fetchSize,
-					this.readTimeout, this.ttl, this.timestamp, this.ifExists, this.ifCondition);
+			return new UpdateOptions(this.consistencyLevel, this.retryPolicy, this.tracing, this.fetchSize, this.readTimeout,
+					this.ttl, this.timestamp, this.ifExists, this.ifCondition);
 		}
 	}
 }
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/convert/AbstractCassandraConverter.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/convert/AbstractCassandraConverter.java
index 81205aef0..659006652 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/convert/AbstractCassandraConverter.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/convert/AbstractCassandraConverter.java
@@ -15,10 +15,10 @@
  */
 package org.springframework.data.cassandra.core.convert;
 
-import java.util.Collections;
-
 import lombok.NonNull;
 
+import java.util.Collections;
+
 import org.springframework.beans.factory.InitializingBean;
 import org.springframework.core.convert.ConversionService;
 import org.springframework.core.convert.support.GenericConversionService;
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/convert/BasicCassandraRowValueProvider.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/convert/BasicCassandraRowValueProvider.java
index 9acedec0b..ac5d0dc52 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/convert/BasicCassandraRowValueProvider.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/convert/BasicCassandraRowValueProvider.java
@@ -76,9 +76,8 @@ public class BasicCassandraRowValueProvider implements CassandraRowValueProvider
 
 		String spelExpression = property.getSpelExpression();
 
-		return spelExpression != null
-			? this.evaluator.evaluate(spelExpression)
-			: (T) this.reader.get(property.getRequiredColumnName());
+		return spelExpression != null ? this.evaluator.evaluate(spelExpression)
+				: (T) this.reader.get(property.getRequiredColumnName());
 	}
 
 	/* (non-Javadoc)
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/convert/CassandraCustomConversions.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/convert/CassandraCustomConversions.java
index 6d7212c51..aef3d9b6d 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/convert/CassandraCustomConversions.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/convert/CassandraCustomConversions.java
@@ -82,8 +82,7 @@ public class CassandraCustomConversions extends org.springframework.data.convert
 					ResolvableType classType = ResolvableType.forClass(it).as(Converter.class).getGeneric(0);
 
 					return classType.getRawClass();
-				})
-				.collect(Collectors.toList());
+				}).collect(Collectors.toList());
 
 		NATIVE_TIME_TYPE_MARKERS = new HashSet<>(timeMarkers);
 	}
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/convert/CassandraThreeTenBackPortConverters.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/convert/CassandraThreeTenBackPortConverters.java
index 38726e1d0..29df7fe54 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/convert/CassandraThreeTenBackPortConverters.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/convert/CassandraThreeTenBackPortConverters.java
@@ -43,9 +43,8 @@ import com.datastax.driver.core.DataType.Name;
  */
 public abstract class CassandraThreeTenBackPortConverters {
 
-	private static final boolean THREE_TEN_BACK_PORT_IS_PRESENT =
-			ClassUtils.isPresent("org.threeten.bp.LocalDateTime",
-					ThreeTenBackPortConverters.class.getClassLoader());
+	private static final boolean THREE_TEN_BACK_PORT_IS_PRESENT = ClassUtils.isPresent("org.threeten.bp.LocalDateTime",
+			ThreeTenBackPortConverters.class.getClassLoader());
 
 	private CassandraThreeTenBackPortConverters() {}
 
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/convert/CassandraUDTValueProvider.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/convert/CassandraUDTValueProvider.java
index 794ba21f1..73bd9cd0f 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/convert/CassandraUDTValueProvider.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/convert/CassandraUDTValueProvider.java
@@ -47,8 +47,7 @@ public class CassandraUDTValueProvider implements CassandraValueProvider {
 	 * @param evaluator must not be {@literal null}.
 	 * @since 2.1
 	 */
-	public CassandraUDTValueProvider(UDTValue udtValue, CodecRegistry codecRegistry,
-			SpELExpressionEvaluator evaluator) {
+	public CassandraUDTValueProvider(UDTValue udtValue, CodecRegistry codecRegistry, SpELExpressionEvaluator evaluator) {
 
 		Assert.notNull(udtValue, "UDTValue must not be null");
 		Assert.notNull(codecRegistry, "CodecRegistry must not be null");
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/convert/UpdateMapper.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/convert/UpdateMapper.java
index 3255a00ac..6cca462e1 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/convert/UpdateMapper.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/convert/UpdateMapper.java
@@ -132,8 +132,8 @@ public class UpdateMapper extends QueryMapper {
 			Assert.state(op.getValue() != null,
 					() -> String.format("SetAtKeyOp for %s attempts to set null", field.getProperty()));
 
-			Optional> typeInformation =
-					field.getProperty().map(PersistentProperty::getTypeInformation);
+			Optional> typeInformation = field.getProperty()
+					.map(PersistentProperty::getTypeInformation);
 
 			Optional> keyType = typeInformation.map(TypeInformation::getComponentType);
 			Optional> valueType = typeInformation.map(TypeInformation::getMapValueType);
@@ -167,8 +167,8 @@ public class UpdateMapper extends QueryMapper {
 
 			if (collection.isEmpty()) {
 
-				DataType.Name dataType = field.getProperty().map(property ->
-						getMappingContext().getDataType(property)).map(DataType::getName).orElse(Name.LIST);
+				DataType.Name dataType = field.getProperty().map(property -> getMappingContext().getDataType(property))
+						.map(DataType::getName).orElse(Name.LIST);
 
 				if (dataType == Name.SET) {
 					return new SetOp(field.getMappedKey(), Collections.emptySet());
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/AsyncCqlOperations.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/AsyncCqlOperations.java
index bd5494445..ec0a9ef20 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/AsyncCqlOperations.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/AsyncCqlOperations.java
@@ -96,8 +96,7 @@ public interface AsyncCqlOperations {
 	 * @return boolean value whether the statement was applied.
 	 * @throws DataAccessException if there is any problem executing the query.
 	 */
-	ListenableFuture execute(String cql, @Nullable PreparedStatementBinder psb)
-			throws DataAccessException;
+	ListenableFuture execute(String cql, @Nullable PreparedStatementBinder psb) throws DataAccessException;
 
 	/**
 	 * Execute a CQL data access operation, implemented as callback action working on a CQL {@link PreparedStatement}.
@@ -223,8 +222,8 @@ public interface AsyncCqlOperations {
 	 * @param rowCallbackHandler object that will extract results, one row at a time, must not be {@literal null}.
 	 * @throws DataAccessException if there is any problem executing the query.
 	 */
-	ListenableFuture query(String cql, @Nullable PreparedStatementBinder psb,
-			RowCallbackHandler rowCallbackHandler) throws DataAccessException;
+	ListenableFuture query(String cql, @Nullable PreparedStatementBinder psb, RowCallbackHandler rowCallbackHandler)
+			throws DataAccessException;
 
 	/**
 	 * Query given CQL to create a prepared statement from CQL and a {@link PreparedStatementBinder} implementation that
@@ -238,8 +237,8 @@ public interface AsyncCqlOperations {
 	 * @return the result {@link List}, containing mapped objects.
 	 * @throws DataAccessException if there is any problem executing the query.
 	 */
-	 ListenableFuture> query(String cql, @Nullable PreparedStatementBinder psb,
-			RowMapper rowMapper) throws DataAccessException;
+	 ListenableFuture> query(String cql, @Nullable PreparedStatementBinder psb, RowMapper rowMapper)
+			throws DataAccessException;
 
 	/**
 	 * Execute a query for a result {@link List}, given static CQL.
@@ -697,8 +696,7 @@ public interface AsyncCqlOperations {
 	 * @throws DataAccessException if there is any problem executing the query.
 	 */
 	 ListenableFuture query(AsyncPreparedStatementCreator preparedStatementCreator,
-			@Nullable PreparedStatementBinder psb, ResultSetExtractor resultSetExtractor)
-			throws DataAccessException;
+			@Nullable PreparedStatementBinder psb, ResultSetExtractor resultSetExtractor) throws DataAccessException;
 
 	/**
 	 * Query using a prepared statement and a {@link PreparedStatementBinder} implementation that knows how to bind values
@@ -713,8 +711,7 @@ public interface AsyncCqlOperations {
 	 * @throws DataAccessException if there is any problem executing the query.
 	 */
 	ListenableFuture query(AsyncPreparedStatementCreator preparedStatementCreator,
-			@Nullable PreparedStatementBinder psb, RowCallbackHandler rowCallbackHandler)
-			throws DataAccessException;
+			@Nullable PreparedStatementBinder psb, RowCallbackHandler rowCallbackHandler) throws DataAccessException;
 
 	/**
 	 * Query using a prepared statement and a {@link PreparedStatementBinder} implementation that knows how to bind values
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/CqlTemplate.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/CqlTemplate.java
index a690e8345..7b73990b5 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/CqlTemplate.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/CqlTemplate.java
@@ -541,8 +541,8 @@ public class CqlTemplate extends CassandraAccessor implements CqlOperations {
 	 * @see org.springframework.data.cassandra.core.cqlOperations#query(org.springframework.data.cassandra.core.cql.PreparedStatementCreator, org.springframework.data.cassandra.core.cql.PreparedStatementBinder, org.springframework.data.cassandra.core.cql.RowMapper)
 	 */
 	@Override
-	public  List query(PreparedStatementCreator preparedStatementCreator,
-			@Nullable PreparedStatementBinder psb, RowMapper rowMapper) throws DataAccessException {
+	public  List query(PreparedStatementCreator preparedStatementCreator, @Nullable PreparedStatementBinder psb,
+			RowMapper rowMapper) throws DataAccessException {
 		// noinspection ConstantConditions
 		return query(preparedStatementCreator, psb, newResultSetExtractor(rowMapper));
 	}
@@ -582,8 +582,8 @@ public class CqlTemplate extends CassandraAccessor implements CqlOperations {
 	 * @see org.springframework.data.cassandra.core.cqlOperations#query(java.lang.String, org.springframework.data.cassandra.core.cql.PreparedStatementBinder, org.springframework.data.cassandra.core.cql.ResultSetExtractor)
 	 */
 	@Override
-	public  T query(String cql, @Nullable PreparedStatementBinder psb,
-			ResultSetExtractor resultSetExtractor) throws DataAccessException {
+	public  T query(String cql, @Nullable PreparedStatementBinder psb, ResultSetExtractor resultSetExtractor)
+			throws DataAccessException {
 
 		return query(newPreparedStatementCreator(cql), psb, resultSetExtractor);
 	}
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/QueryOptions.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/QueryOptions.java
index d0d7664ba..3ea7e2861 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/QueryOptions.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/QueryOptions.java
@@ -15,11 +15,11 @@
  */
 package org.springframework.data.cassandra.core.cql;
 
+import lombok.EqualsAndHashCode;
+
 import java.time.Duration;
 import java.util.concurrent.TimeUnit;
 
-import lombok.EqualsAndHashCode;
-
 import org.springframework.lang.Nullable;
 import org.springframework.util.Assert;
 
@@ -312,8 +312,7 @@ public class QueryOptions {
 		 * @return a new {@link QueryOptions} with the configured values
 		 */
 		public QueryOptions build() {
-			return new QueryOptions(this.consistencyLevel, this.retryPolicy, this.tracing,
-					this.fetchSize, this.readTimeout);
+			return new QueryOptions(this.consistencyLevel, this.retryPolicy, this.tracing, this.fetchSize, this.readTimeout);
 		}
 	}
 }
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/ReactiveCqlTemplate.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/ReactiveCqlTemplate.java
index 5147ee535..869aa0916 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/ReactiveCqlTemplate.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/ReactiveCqlTemplate.java
@@ -615,8 +615,7 @@ public class ReactiveCqlTemplate extends ReactiveCassandraAccessor implements Re
 
 		Assert.hasText(cql, "CQL must not be empty");
 
-		return query(newReactivePreparedStatementCreator(cql), newArgPreparedStatementBinder(args), Mono::just)
-				.next();
+		return query(newReactivePreparedStatementCreator(cql), newArgPreparedStatementBinder(args), Mono::just).next();
 	}
 
 	/* (non-Javadoc)
@@ -641,8 +640,7 @@ public class ReactiveCqlTemplate extends ReactiveCassandraAccessor implements Re
 	 */
 	@Override
 	public Mono execute(String cql, @Nullable PreparedStatementBinder psb) throws DataAccessException {
-		return query(newReactivePreparedStatementCreator(cql), psb, resultSet -> Mono.just(resultSet.wasApplied()))
-				.next();
+		return query(newReactivePreparedStatementCreator(cql), psb, resultSet -> Mono.just(resultSet.wasApplied())).next();
 	}
 
 	/* (non-Javadoc)
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/generator/AddColumnCqlGenerator.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/generator/AddColumnCqlGenerator.java
index 4a305f2e3..09c2e10f5 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/generator/AddColumnCqlGenerator.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/generator/AddColumnCqlGenerator.java
@@ -37,7 +37,6 @@ public class AddColumnCqlGenerator extends ColumnChangeCqlGenerator entries = new ArrayList<>(options.size());
 
-			options.forEach((key, value) -> entries.add(String.format("'%s': '%s'",
-					CqlStringUtils.escapeSingle(key), CqlStringUtils.escapeSingle(value))));
+			options.forEach((key, value) -> entries
+					.add(String.format("'%s': '%s'", CqlStringUtils.escapeSingle(key), CqlStringUtils.escapeSingle(value))));
 
 			StringBuilder optionsCql = new StringBuilder(" WITH OPTIONS = ").append("{");
 
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/generator/CreateKeyspaceCqlGenerator.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/generator/CreateKeyspaceCqlGenerator.java
index 9154dcf2d..3c2e74e06 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/generator/CreateKeyspaceCqlGenerator.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/generator/CreateKeyspaceCqlGenerator.java
@@ -50,8 +50,7 @@ public class CreateKeyspaceCqlGenerator extends KeyspaceOptionsCqlGenerator extends BasicPersistentEntity
 		implements CassandraPersistentEntity, ApplicationContextAware {
 
-	private static final CassandraPersistentEntityMetadataVerifier DEFAULT_VERIFIER =
-			new CompositeCassandraPersistentEntityMetadataVerifier();
+	private static final CassandraPersistentEntityMetadataVerifier DEFAULT_VERIFIER = new CompositeCassandraPersistentEntityMetadataVerifier();
 
 	private Boolean forceQuote;
 
@@ -103,7 +102,6 @@ public class BasicCassandraPersistentEntity extends BasicPersistentEntity extends BasicPersistentEntity SpelUtils.evaluate(value, it))
-				.orElse(value);
+		String name = Optional.ofNullable(this.spelContext).map(it -> SpelUtils.evaluate(value, it)).orElse(value);
 
 		Assert.state(name != null, () -> String.format("Cannot determine default name for %s", this));
 
@@ -142,8 +138,7 @@ public class BasicCassandraPersistentEntity extends BasicPersistentEntity handler) {
-	}
+	public void doWithAssociations(AssociationHandler handler) {}
 
 	/* (non-Javadoc)
 	 * @see org.springframework.data.cassandra.core.mapping.CassandraPersistentEntity#isCompositePrimaryKey()
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/BasicCassandraPersistentEntityMetadataVerifier.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/BasicCassandraPersistentEntityMetadataVerifier.java
index 8cf84fa70..c22d230a6 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/BasicCassandraPersistentEntityMetadataVerifier.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/BasicCassandraPersistentEntityMetadataVerifier.java
@@ -83,8 +83,8 @@ public class BasicCassandraPersistentEntityMetadataVerifier implements Cassandra
 
 			// Can only have one PK
 			if (idProperties.size() != 1) {
-				exceptions.add(new MappingException(
-						String.format("@%s types must have only one primary attribute, if any; Found %s",
+				exceptions
+						.add(new MappingException(String.format("@%s types must have only one primary attribute, if any; Found %s",
 								Table.class.getSimpleName(), idProperties.size())));
 
 				fail(entity, exceptions);
@@ -102,8 +102,8 @@ public class BasicCassandraPersistentEntityMetadataVerifier implements Cassandra
 
 		// We have no PKs & only PK Column(s); ensure at least one is of type PARTITIONED
 		if (!primaryKeyColumns.isEmpty() && partitionKeyColumns.isEmpty()) {
-			exceptions.add(new MappingException(
-					String.format("At least one of the @%s annotations must have a type of PARTITIONED",
+			exceptions
+					.add(new MappingException(String.format("At least one of the @%s annotations must have a type of PARTITIONED",
 							PrimaryKeyColumn.class.getSimpleName())));
 		}
 
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/BasicCassandraPersistentProperty.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/BasicCassandraPersistentProperty.java
index 0260ffd20..ca621c836 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/BasicCassandraPersistentProperty.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/BasicCassandraPersistentProperty.java
@@ -134,8 +134,7 @@ public class BasicCassandraPersistentProperty extends AnnotationBasedPersistentP
 			this.columnName = determineColumnName();
 		}
 
-		Assert.state(this.columnName != null,
-			() -> String.format("Cannot determine column name for %s", this));
+		Assert.state(this.columnName != null, () -> String.format("Cannot determine column name for %s", this));
 
 		return this.columnName;
 	}
@@ -172,7 +171,7 @@ public class BasicCassandraPersistentProperty extends AnnotationBasedPersistentP
 		if (dataType == null) {
 			throw new InvalidDataAccessApiUsageException(String.format(
 					"Unknown type [%s] for property [%s] in entity [%s]; only primitive types and Collections or Maps of primitive types are allowed",
-							getType(), getName(), getOwner().getName()));
+					getType(), getName(), getOwner().getName()));
 		}
 
 		return dataType;
@@ -266,7 +265,7 @@ public class BasicCassandraPersistentProperty extends AnnotationBasedPersistentP
 		if (dataType == null) {
 			throw new InvalidDataAccessApiUsageException(String.format(
 					"Only primitive types are allowed inside Collections for property [%1$s] of type ['%2$s'] in entity [%3$s]",
-							getName(), getType(), getOwner().getName()));
+					getName(), getType(), getOwner().getName()));
 		}
 
 		return dataType;
@@ -275,9 +274,9 @@ public class BasicCassandraPersistentProperty extends AnnotationBasedPersistentP
 	private void assertTypeArguments(int args, int expected) {
 
 		if (args != expected) {
-			throw new InvalidDataAccessApiUsageException(
-					String.format("Expected [%1$s] type arguments for property ['%2$s'] of type ['%3$s'] in entity [%4$s]; actual was [%5$d]",
-							expected, getName(), getType(), getOwner().getName(), args));
+			throw new InvalidDataAccessApiUsageException(String.format(
+					"Expected [%1$s] type arguments for property ['%2$s'] of type ['%3$s'] in entity [%4$s]; actual was [%5$d]",
+					expected, getName(), getType(), getOwner().getName(), args));
 		}
 	}
 
@@ -430,7 +429,8 @@ public class BasicCassandraPersistentProperty extends AnnotationBasedPersistentP
 	@Override
 	public AnnotatedType findAnnotatedType(Class annotationType) {
 
-		return Optionals.toStream(Optional.ofNullable(getField()).map(Field::getAnnotatedType),
+		return Optionals
+				.toStream(Optional.ofNullable(getField()).map(Field::getAnnotatedType),
 						Optional.ofNullable(getGetter()).map(Method::getAnnotatedReturnType),
 						Optional.ofNullable(getSetter()).map(it -> it.getParameters()[0].getAnnotatedType()))
 				.filter(it -> hasAnnotation(it, annotationType, getTypeInformation())).findFirst().orElse(null);
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/BasicCassandraPersistentTupleEntity.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/BasicCassandraPersistentTupleEntity.java
index b44a0cde7..d3cb7a646 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/BasicCassandraPersistentTupleEntity.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/BasicCassandraPersistentTupleEntity.java
@@ -59,10 +59,8 @@ public class BasicCassandraPersistentTupleEntity extends BasicCassandraPersis
 
 	private List getTupleFieldDataTypes() {
 
-		return StreamSupport.stream(spliterator(), false)
-				.sorted(TuplePropertyComparator.INSTANCE)
-				.map(CassandraPersistentProperty::getDataType)
-				.collect(Collectors.toList());
+		return StreamSupport.stream(spliterator(), false).sorted(TuplePropertyComparator.INSTANCE)
+				.map(CassandraPersistentProperty::getDataType).collect(Collectors.toList());
 	}
 
 	/* (non-Javadoc)
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/BasicCassandraPersistentTupleProperty.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/BasicCassandraPersistentTupleProperty.java
index 9c4238c19..ca4fb2d65 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/BasicCassandraPersistentTupleProperty.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/BasicCassandraPersistentTupleProperty.java
@@ -75,13 +75,14 @@ public class BasicCassandraPersistentTupleProperty extends BasicCassandraPersist
 			ordinal = getRequiredAnnotation(Element.class).value();
 		} catch (IllegalStateException cause) {
 			throw new MappingException(
-					String.format("Missing @Element annotation in mapped tuple type for property [%s] in entity [%s]",
-							getName(), getOwner().getName()), cause);
+					String.format("Missing @Element annotation in mapped tuple type for property [%s] in entity [%s]", getName(),
+							getOwner().getName()),
+					cause);
 		}
 
 		Assert.isTrue(ordinal >= 0,
-				String.format("Element ordinal must be greater or equal to zero for property [%s] in entity [%s]",
-						getName(), getOwner().getName()));
+				String.format("Element ordinal must be greater or equal to zero for property [%s] in entity [%s]", getName(),
+						getOwner().getName()));
 
 		return ordinal;
 	}
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/CassandraMappingContext.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/CassandraMappingContext.java
index a18ab047d..d6ba640a1 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/CassandraMappingContext.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/CassandraMappingContext.java
@@ -294,8 +294,8 @@ public class CassandraMappingContext
 			}
 			// now do some caching of the entity
 
-			Set> entities =
-					this.entitySetsByTableName.computeIfAbsent(entity.getTableName(), cqlIdentifier -> new HashSet<>());
+			Set> entities = this.entitySetsByTableName.computeIfAbsent(entity.getTableName(),
+					cqlIdentifier -> new HashSet<>());
 
 			entities.add(entity);
 
@@ -324,10 +324,9 @@ public class CassandraMappingContext
 	protected  BasicCassandraPersistentEntity createPersistentEntity(TypeInformation typeInformation) {
 
 		BasicCassandraPersistentEntity entity = isUserDefinedType(typeInformation)
-			? new CassandraUserTypePersistentEntity<>(typeInformation, getVerifier(), resolveUserTypeResolver())
-			: isTuple(typeInformation)
-				? new BasicCassandraPersistentTupleEntity<>(typeInformation, getTupleTypeFactory())
-				: new BasicCassandraPersistentEntity<>(typeInformation, getVerifier());
+				? new CassandraUserTypePersistentEntity<>(typeInformation, getVerifier(), resolveUserTypeResolver())
+				: isTuple(typeInformation) ? new BasicCassandraPersistentTupleEntity<>(typeInformation, getTupleTypeFactory())
+						: new BasicCassandraPersistentEntity<>(typeInformation, getVerifier());
 
 		Optional.ofNullable(this.applicationContext).ifPresent(entity::setApplicationContext);
 
@@ -360,8 +359,8 @@ public class CassandraMappingContext
 			BasicCassandraPersistentEntity owner, SimpleTypeHolder simpleTypeHolder) {
 
 		BasicCassandraPersistentProperty persistentProperty = owner.isTupleType()
-			? new BasicCassandraPersistentTupleProperty(property, owner, simpleTypeHolder, getUserTypeResolver())
-			: new BasicCassandraPersistentProperty(property, owner, simpleTypeHolder, getUserTypeResolver());
+				? new BasicCassandraPersistentTupleProperty(property, owner, simpleTypeHolder, getUserTypeResolver())
+				: new BasicCassandraPersistentProperty(property, owner, simpleTypeHolder, getUserTypeResolver());
 
 		Optional.ofNullable(this.applicationContext).ifPresent(persistentProperty::setApplicationContext);
 
@@ -403,9 +402,7 @@ public class CassandraMappingContext
 
 		return getPersistentEntities().stream().flatMap(entity -> StreamSupport.stream(entity.spliterator(), false))
 				.flatMap(it -> Optionals.toStream(Optional.ofNullable(it.findAnnotation(CassandraType.class))))
-				.map(CassandraType::userTypeName)
-				.filter(StringUtils::hasText)
-				.map(CqlIdentifier::of)
+				.map(CassandraType::userTypeName).filter(StringUtils::hasText).map(CqlIdentifier::of)
 				.anyMatch(identifier::equals);
 	}
 
@@ -548,8 +545,7 @@ public class CassandraMappingContext
 
 			if (annotation.type() == Name.TUPLE) {
 
-				DataType[] dataTypes = Arrays.stream(annotation.typeArguments())
-						.map(CassandraSimpleTypeHolder::getDataTypeFor)
+				DataType[] dataTypes = Arrays.stream(annotation.typeArguments()).map(CassandraSimpleTypeHolder::getDataTypeFor)
 						.toArray(DataType[]::new);
 
 				return getTupleTypeFactory().create(dataTypes);
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/CassandraPersistentProperty.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/CassandraPersistentProperty.java
index ebf292e49..7a9bdbaca 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/CassandraPersistentProperty.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/CassandraPersistentProperty.java
@@ -65,8 +65,7 @@ public interface CassandraPersistentProperty
 
 		CqlIdentifier columnName = getColumnName();
 
-		Assert.state(columnName != null,
-			String.format("No column name available for this persistent property [%1$s.%2$s]",
+		Assert.state(columnName != null, String.format("No column name available for this persistent property [%1$s.%2$s]",
 				getOwner().getName(), getName()));
 
 		return columnName;
@@ -105,8 +104,7 @@ public interface CassandraPersistentProperty
 
 		Integer ordinal = getOrdinal();
 
-		Assert.state(ordinal != null ,
-			String.format("No ordinal available for this persistent property [%1$s.%2$s]",
+		Assert.state(ordinal != null, String.format("No ordinal available for this persistent property [%1$s.%2$s]",
 				getOwner().getName(), getName()));
 
 		return ordinal;
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/CassandraPersistentTupleMetadataVerifier.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/CassandraPersistentTupleMetadataVerifier.java
index bc25b27fc..241d2a908 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/CassandraPersistentTupleMetadataVerifier.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/CassandraPersistentTupleMetadataVerifier.java
@@ -53,15 +53,14 @@ enum CassandraPersistentTupleMetadataVerifier implements CassandraPersistentEnti
 			}
 
 			if (!ordinals.add(tupleProperty.getOrdinal())) {
-				throw new MappingException(String.format("Duplicate ordinal [%d] in entity [%s]",
-						tupleProperty.getOrdinal(), entity.getName()));
+				throw new MappingException(
+						String.format("Duplicate ordinal [%d] in entity [%s]", tupleProperty.getOrdinal(), entity.getName()));
 			}
 		}
 
 		if (ordinals.isEmpty()) {
-			throw new MappingException(
-					String.format("Mapped tuple contains no persistent elements annotated with @Element in entity [%s]",
-							entity.getName()));
+			throw new MappingException(String.format(
+					"Mapped tuple contains no persistent elements annotated with @Element in entity [%s]", entity.getName()));
 		}
 
 		List missingMappings = IntStream.range(0, ordinals.size()).boxed().collect(Collectors.toList());
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/CassandraSimpleTypeHolder.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/CassandraSimpleTypeHolder.java
index f8234cd1d..c00dc1d37 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/CassandraSimpleTypeHolder.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/CassandraSimpleTypeHolder.java
@@ -151,11 +151,8 @@ public class CassandraSimpleTypeHolder extends SimpleTypeHolder {
 	 */
 	private static Set> getCassandraPrimitiveTypes(CodecRegistry codecRegistry) {
 
-		return DataType.allPrimitiveTypes().stream()
-				.map(codecRegistry::codecFor)
-				.map(TypeCodec::getJavaType)
-				.map(TypeToken::getRawType)
-				.collect(Collectors.toSet());
+		return DataType.allPrimitiveTypes().stream().map(codecRegistry::codecFor).map(TypeCodec::getJavaType)
+				.map(TypeToken::getRawType).collect(Collectors.toSet());
 	}
 
 	/**
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/EntityMapping.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/EntityMapping.java
index b59e12346..ac0c61e7e 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/EntityMapping.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/EntityMapping.java
@@ -145,7 +145,7 @@ public class EntityMapping {
 	@Override
 	public String toString() {
 		return String.format(
-			"{ @type = %1$s, entityClassName = %2$s, tableName = %3$s, forceQuote = %4$s, propertyMappings = %5$s }",
+				"{ @type = %1$s, entityClassName = %2$s, tableName = %3$s, forceQuote = %4$s, propertyMappings = %5$s }",
 				getClass().getName(), getEntityClassName(), getTableName(), getForceQuote(), toString(getPropertyMappings()));
 	}
 
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/IndexSpecificationFactory.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/IndexSpecificationFactory.java
index de68cbfc9..04d4eb821 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/IndexSpecificationFactory.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/IndexSpecificationFactory.java
@@ -94,11 +94,12 @@ class IndexSpecificationFactory {
 				AnnotatedParameterizedType parameterizedType = (AnnotatedParameterizedType) type;
 				AnnotatedType[] typeArgs = parameterizedType.getAnnotatedActualTypeArguments();
 
-				Indexed keyIndex = typeArgs.length == 2
-						? AnnotatedElementUtils.getMergedAnnotation(typeArgs[0], Indexed.class) : null;
+				Indexed keyIndex = typeArgs.length == 2 ? AnnotatedElementUtils.getMergedAnnotation(typeArgs[0], Indexed.class)
+						: null;
 
 				Indexed valueIndex = typeArgs.length == 2
-						? AnnotatedElementUtils.getMergedAnnotation(typeArgs[1], Indexed.class) : null;
+						? AnnotatedElementUtils.getMergedAnnotation(typeArgs[1], Indexed.class)
+						: null;
 
 				if ((!indexes.isEmpty() && (keyIndex != null || valueIndex != null))
 						|| (keyIndex != null && valueIndex != null)) {
@@ -152,8 +153,8 @@ class IndexSpecificationFactory {
 		long analyzerCount = INDEX_CONFIGURERS.keySet().stream().filter(property::isAnnotationPresent).count();
 
 		if (analyzerCount > 1) {
-			throw new IllegalStateException(String.format(
-					"SASI indexed property %s must be annotated only with a single analyzer annotation", property));
+			throw new IllegalStateException(
+					String.format("SASI indexed property %s must be annotated only with a single analyzer annotation", property));
 		}
 
 		for (Class annotationType : INDEX_CONFIGURERS.keySet()) {
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/PrimaryKeyClassEntityMetadataVerifier.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/PrimaryKeyClassEntityMetadataVerifier.java
index f84bfbf50..0ec2133a6 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/PrimaryKeyClassEntityMetadataVerifier.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/PrimaryKeyClassEntityMetadataVerifier.java
@@ -64,8 +64,8 @@ public class PrimaryKeyClassEntityMetadataVerifier implements CassandraPersisten
 
 		// Ensure PrimaryKeyClass only extends Object
 		if (!entityType.getSuperclass().equals(Object.class)) {
-			exceptions.add(new MappingException(String.format("@%s must only extend Object",
-					PrimaryKeyClass.class.getSimpleName())));
+			exceptions.add(
+					new MappingException(String.format("@%s must only extend Object", PrimaryKeyClass.class.getSimpleName())));
 		}
 
 		entity.forEach(property -> {
@@ -82,29 +82,29 @@ public class PrimaryKeyClassEntityMetadataVerifier implements CassandraPersisten
 		});
 
 		if (!compositePrimaryKeys.isEmpty()) {
-			exceptions.add(new MappingException(
-				"Composite primary keys are not allowed inside of composite primary key classes"));
+			exceptions
+					.add(new MappingException("Composite primary keys are not allowed inside of composite primary key classes"));
 		}
 
 		// Must have at least 1 attribute annotated with @PrimaryKeyColumn
 		if (primaryKeyColumns.isEmpty()) {
-			exceptions.add(new MappingException(String.format(
-				"Composite primary key type [%1$s] has no fields annotated with @%2$s",
-					entity.getType().getName(), PrimaryKeyColumn.class.getSimpleName())));
+			exceptions.add(
+					new MappingException(String.format("Composite primary key type [%1$s] has no fields annotated with @%2$s",
+							entity.getType().getName(), PrimaryKeyColumn.class.getSimpleName())));
 		}
 
 		// At least one of the PrimaryKeyColumns must have a type PARTIONED
 		if (partitionKeyColumns.isEmpty()) {
-			exceptions.add(new MappingException(String.format(
-				"At least one of the @%s annotations must have a type of PARTITIONED",
-					PrimaryKeyColumn.class.getSimpleName())));
+			exceptions
+					.add(new MappingException(String.format("At least one of the @%s annotations must have a type of PARTITIONED",
+							PrimaryKeyColumn.class.getSimpleName())));
 		}
 
 		// Cannot have any Id or PrimaryKey Annotations
 		if (!idProperties.isEmpty()) {
-			exceptions.add(new MappingException(String.format(
-				"Annotations @%1$s and @%2$s are invalid for type annotated with @%3$s",
-					Id.class.getSimpleName(), PrimaryKey.class.getSimpleName(), PrimaryKeyClass.class.getSimpleName())));
+			exceptions.add(
+					new MappingException(String.format("Annotations @%1$s and @%2$s are invalid for type annotated with @%3$s",
+							Id.class.getSimpleName(), PrimaryKey.class.getSimpleName(), PrimaryKeyClass.class.getSimpleName())));
 		}
 
 		// Determine whether or not to throw Exception based on errors found
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/query/CassandraPageRequest.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/query/CassandraPageRequest.java
index 3e8686903..11f89b8be 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/query/CassandraPageRequest.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/query/CassandraPageRequest.java
@@ -198,8 +198,7 @@ public class CassandraPageRequest extends PageRequest {
 
 		Assert.state(hasNext(), "Cannot create a next page request without a PagingState");
 
-		return new CassandraPageRequest(getPageNumber() + 1, getPageSize(), getSort(),
-				this.pagingState, false);
+		return new CassandraPageRequest(getPageNumber() + 1, getPageSize(), getSort(), this.pagingState, false);
 	}
 
 	/* (non-Javadoc)
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/query/CriteriaDefinition.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/query/CriteriaDefinition.java
index f3c150140..584142546 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/query/CriteriaDefinition.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/query/CriteriaDefinition.java
@@ -15,10 +15,10 @@
  */
 package org.springframework.data.cassandra.core.query;
 
-import java.util.Optional;
-
 import lombok.EqualsAndHashCode;
 
+import java.util.Optional;
+
 import org.springframework.lang.Nullable;
 import org.springframework.util.Assert;
 
@@ -115,9 +115,7 @@ public interface CriteriaDefinition {
 	 */
 	enum Operators implements Operator {
 
-		CONTAINS("CONTAINS"),
-		CONTAINS_KEY("CONTAINS KEY"),
-		EQ("="),
+		CONTAINS("CONTAINS"), CONTAINS_KEY("CONTAINS KEY"), EQ("="),
 
 		/**
 		 * @since 2.1
@@ -134,12 +132,7 @@ public interface CriteriaDefinition {
 			}
 		},
 
-		GT(">"),
-		GTE(">="),
-		LT("<"),
-		LTE("<="),
-		IN("IN"),
-		LIKE("LIKE");
+		GT(">"), GTE(">="), LT("<"), LTE("<="), IN("IN"), LIKE("LIKE");
 
 		public static Optional from(String operator) {
 
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/query/Query.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/query/Query.java
index dcc1bfc37..eea32e473 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/query/Query.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/query/Query.java
@@ -15,9 +15,8 @@
  */
 package org.springframework.data.cassandra.core.query;
 
-import static java.util.stream.StreamSupport.stream;
-import static org.springframework.util.ObjectUtils.nullSafeEquals;
-import static org.springframework.util.ObjectUtils.nullSafeHashCode;
+import static java.util.stream.StreamSupport.*;
+import static org.springframework.util.ObjectUtils.*;
 
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -108,11 +107,10 @@ public class Query implements Filter {
 
 		Assert.notNull(criteriaDefinitions, "CriteriaDefinitions must not be null");
 
-		List collect = stream(criteriaDefinitions.spliterator(), false)
-				.collect(Collectors.toList());
+		List collect = stream(criteriaDefinitions.spliterator(), false).collect(Collectors.toList());
 
-		return new Query(collect, Columns.empty(), Sort.unsorted(), Optional.empty(), Optional.empty(),
-				Optional.empty(), false);
+		return new Query(collect, Columns.empty(), Sort.unsorted(), Optional.empty(), Optional.empty(), Optional.empty(),
+				false);
 	}
 
 	/**
@@ -184,8 +182,8 @@ public class Query implements Filter {
 			}
 		}
 
-		return new Query(this.criteriaDefinitions, this.columns, this.sort.and(sort), this.pagingState,
-				this.queryOptions, this.limit, this.allowFiltering);
+		return new Query(this.criteriaDefinitions, this.columns, this.sort.and(sort), this.pagingState, this.queryOptions,
+				this.limit, this.allowFiltering);
 	}
 
 	/**
@@ -289,8 +287,8 @@ public class Query implements Filter {
 	 * @return a new {@link Query} object containing the former settings with {@code allowFiltering} applied.
 	 */
 	public Query withAllowFiltering() {
-		return new Query(this.criteriaDefinitions, this.columns, this.sort, this.pagingState, this.queryOptions,
-				this.limit, true);
+		return new Query(this.criteriaDefinitions, this.columns, this.sort, this.pagingState, this.queryOptions, this.limit,
+				true);
 	}
 
 	/**
@@ -362,8 +360,7 @@ public class Query implements Filter {
 	@Override
 	public String toString() {
 
-		String query = stream(this.spliterator(), false)
-				.map(SerializationUtils::serializeToCqlSafely)
+		String query = stream(this.spliterator(), false).map(SerializationUtils::serializeToCqlSafely)
 				.collect(Collectors.joining(" AND "));
 
 		return String.format("Query: %s, Columns: %s, Sort: %s, Limit: %d", query, getColumns(), getSort(), getLimit());
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/query/Update.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/query/Update.java
index 9b158793b..5c6671c63 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/query/Update.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/query/Update.java
@@ -15,7 +15,7 @@
  */
 package org.springframework.data.cassandra.core.query;
 
-import static org.springframework.data.cassandra.core.query.SerializationUtils.serializeToCqlSafely;
+import static org.springframework.data.cassandra.core.query.SerializationUtils.*;
 
 import java.util.Arrays;
 import java.util.Collection;
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/query/AbstractCassandraQuery.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/query/AbstractCassandraQuery.java
index 3338a4a77..0184cf84e 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/query/AbstractCassandraQuery.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/query/AbstractCassandraQuery.java
@@ -95,8 +95,8 @@ public abstract class AbstractCassandraQuery extends CassandraRepositoryQuerySup
 
 		Statement statement = createQuery(parameterAccessor);
 
-		CassandraQueryExecution queryExecution = getExecution(parameterAccessor, new ResultProcessingConverter(
-				resultProcessor, toMappingContext(getOperations()), getEntityInstantiators()));
+		CassandraQueryExecution queryExecution = getExecution(parameterAccessor,
+				new ResultProcessingConverter(resultProcessor, toMappingContext(getOperations()), getEntityInstantiators()));
 
 		Class resultType = resolveResultType(resultProcessor);
 
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/query/CassandraQueryMethod.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/query/CassandraQueryMethod.java
index e3f780913..d9a3a77e7 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/query/CassandraQueryMethod.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/query/CassandraQueryMethod.java
@@ -114,8 +114,8 @@ public class CassandraQueryMethod extends QueryMethod {
 				CassandraPersistentEntity returnedEntity = this.mappingContext.getPersistentEntity(returnedObjectType);
 				CassandraPersistentEntity managedEntity = this.mappingContext.getRequiredPersistentEntity(domainClass);
 
-				returnedEntity = returnedEntity == null || returnedEntity.getType().isInterface()
-						? managedEntity : returnedEntity;
+				returnedEntity = returnedEntity == null || returnedEntity.getType().isInterface() ? managedEntity
+						: returnedEntity;
 
 				this.entityMetadata = new SimpleCassandraEntityMetadata<>((Class) returnedEntity.getType(),
 						managedEntity);
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/query/ConvertingParameterAccessor.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/query/ConvertingParameterAccessor.java
index bde8d49e6..7fe668699 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/query/ConvertingParameterAccessor.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/query/ConvertingParameterAccessor.java
@@ -106,7 +106,6 @@ class ConvertingParameterAccessor implements CassandraParameterAccessor {
 		return this.delegate.getDataType(index);
 	}
 
-
 	/* (non-Javadoc)
 	 * @see org.springframework.data.cassandra.repository.query.CassandraParameterAccessor#getParameterType(int)
 	 */
@@ -155,16 +154,15 @@ class ConvertingParameterAccessor implements CassandraParameterAccessor {
 			return null;
 		}
 
-		return this.converter.convertToColumnType(bindableValue,
-				findTypeInformation(index, bindableValue, null));
+		return this.converter.convertToColumnType(bindableValue, findTypeInformation(index, bindableValue, null));
 	}
 
 	@SuppressWarnings("unchecked")
 	@Nullable
 	private Object potentiallyConvert(int index, @Nullable Object bindableValue, CassandraPersistentProperty property) {
 
-		return (bindableValue == null ? null : this.converter.convertToColumnType(bindableValue,
-				findTypeInformation(index, bindableValue, property)));
+		return (bindableValue == null ? null
+				: this.converter.convertToColumnType(bindableValue, findTypeInformation(index, bindableValue, property)));
 	}
 
 	private TypeInformation findTypeInformation(int index, Object bindableValue,
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/query/ProjectionUtil.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/query/ProjectionUtil.java
index 358a6d00f..895b39bb6 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/query/ProjectionUtil.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/query/ProjectionUtil.java
@@ -15,12 +15,12 @@
  */
 package org.springframework.data.cassandra.repository.query;
 
+import lombok.experimental.UtilityClass;
+
 import java.util.Arrays;
 import java.util.HashSet;
 import java.util.Set;
 
-import lombok.experimental.UtilityClass;
-
 import com.datastax.driver.core.ColumnDefinitions;
 import com.datastax.driver.core.DataType;
 import com.datastax.driver.core.Row;
@@ -48,9 +48,8 @@ class ProjectionUtil {
 	}
 
 	/**
-	 * Determine whether the {@link Row} qualifies as a count projection.
-	 *
-	 * Count projection candidates have a single numeric column.
+	 * Determine whether the {@link Row} qualifies as a count projection. Count projection candidates have a single
+	 * numeric column.
 	 *
 	 * @param row {@link Row} to evaluate for a count projection.
 	 * @return a boolean value indicating whether the {@link Row} qualifies as a count projection.
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/query/ReactiveStringBasedCassandraQuery.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/query/ReactiveStringBasedCassandraQuery.java
index 7262bceb2..e74927d42 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/query/ReactiveStringBasedCassandraQuery.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/query/ReactiveStringBasedCassandraQuery.java
@@ -47,14 +47,14 @@ public class ReactiveStringBasedCassandraQuery extends AbstractReactiveCassandra
 
 	/**
 	 * Create a new {@link ReactiveStringBasedCassandraQuery} for the given {@link CassandraQueryMethod},
-	 * {@link ReactiveCassandraOperations}, {@link SpelExpressionParser},
-	 * and {@link QueryMethodEvaluationContextProvider}.
+	 * {@link ReactiveCassandraOperations}, {@link SpelExpressionParser}, and
+	 * {@link QueryMethodEvaluationContextProvider}.
 	 *
 	 * @param queryMethod {@link ReactiveCassandraQueryMethod} on which this query is based.
 	 * @param operations {@link ReactiveCassandraOperations} used to perform data access in Cassandra.
 	 * @param expressionParser {@link SpelExpressionParser} used to parse expressions in the query.
-	 * @param evaluationContextProvider {@link QueryMethodEvaluationContextProvider} used to access
-	 * the potentially shared {@link org.springframework.expression.spel.support.StandardEvaluationContext}.
+	 * @param evaluationContextProvider {@link QueryMethodEvaluationContextProvider} used to access the potentially shared
+	 *          {@link org.springframework.expression.spel.support.StandardEvaluationContext}.
 	 * @see org.springframework.data.cassandra.repository.query.ReactiveCassandraQueryMethod
 	 * @see org.springframework.data.cassandra.core.ReactiveCassandraOperations
 	 */
@@ -62,20 +62,19 @@ public class ReactiveStringBasedCassandraQuery extends AbstractReactiveCassandra
 			ReactiveCassandraOperations operations, SpelExpressionParser expressionParser,
 			QueryMethodEvaluationContextProvider evaluationContextProvider) {
 
-		this(queryMethod.getRequiredAnnotatedQuery(), queryMethod, operations, expressionParser,
-				evaluationContextProvider);
+		this(queryMethod.getRequiredAnnotatedQuery(), queryMethod, operations, expressionParser, evaluationContextProvider);
 	}
 
 	/**
 	 * Create a new {@link ReactiveStringBasedCassandraQuery} for the given {@code query}, {@link CassandraQueryMethod},
-	 * {@link ReactiveCassandraOperations}, {@link SpelExpressionParser},
-	 * and {@link QueryMethodEvaluationContextProvider}.
+	 * {@link ReactiveCassandraOperations}, {@link SpelExpressionParser}, and
+	 * {@link QueryMethodEvaluationContextProvider}.
 	 *
 	 * @param method {@link ReactiveCassandraQueryMethod} on which this query is based.
 	 * @param operations {@link ReactiveCassandraOperations} used to perform data access in Cassandra.
 	 * @param expressionParser {@link SpelExpressionParser} used to parse expressions in the query.
-	 * @param evaluationContextProvider {@link QueryMethodEvaluationContextProvider} used to access
-	 * the potentially shared {@link org.springframework.expression.spel.support.StandardEvaluationContext}.
+	 * @param evaluationContextProvider {@link QueryMethodEvaluationContextProvider} used to access the potentially shared
+	 *          {@link org.springframework.expression.spel.support.StandardEvaluationContext}.
 	 * @see org.springframework.data.cassandra.repository.query.ReactiveCassandraQueryMethod
 	 * @see org.springframework.data.cassandra.core.ReactiveCassandraOperations
 	 */
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/query/StringBasedCassandraQuery.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/query/StringBasedCassandraQuery.java
index 73451b943..7e6377687 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/query/StringBasedCassandraQuery.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/query/StringBasedCassandraQuery.java
@@ -51,16 +51,15 @@ public class StringBasedCassandraQuery extends AbstractCassandraQuery {
 	 * @param queryMethod {@link CassandraQueryMethod} on which this query is based.
 	 * @param operations {@link CassandraOperations} used to perform data access in Cassandra.
 	 * @param expressionParser {@link SpelExpressionParser} used to parse expressions in the query.
-	 * @param evaluationContextProvider {@link QueryMethodEvaluationContextProvider} used to access
-	 * the potentially shared {@link org.springframework.expression.spel.support.StandardEvaluationContext}.
+	 * @param evaluationContextProvider {@link QueryMethodEvaluationContextProvider} used to access the potentially shared
+	 *          {@link org.springframework.expression.spel.support.StandardEvaluationContext}.
 	 * @see org.springframework.data.cassandra.repository.query.CassandraQueryMethod
 	 * @see org.springframework.data.cassandra.core.CassandraOperations
 	 */
 	public StringBasedCassandraQuery(CassandraQueryMethod queryMethod, CassandraOperations operations,
 			SpelExpressionParser expressionParser, QueryMethodEvaluationContextProvider evaluationContextProvider) {
 
-		this(queryMethod.getRequiredAnnotatedQuery(), queryMethod, operations, expressionParser,
-				evaluationContextProvider);
+		this(queryMethod.getRequiredAnnotatedQuery(), queryMethod, operations, expressionParser, evaluationContextProvider);
 	}
 
 	/**
@@ -71,8 +70,8 @@ public class StringBasedCassandraQuery extends AbstractCassandraQuery {
 	 * @param method {@link CassandraQueryMethod} on which this query is based.
 	 * @param operations {@link CassandraOperations} used to perform data access in Cassandra.
 	 * @param expressionParser {@link SpelExpressionParser} used to parse expressions in the query.
-	 * @param evaluationContextProvider {@link QueryMethodEvaluationContextProvider} used to access
-	 * the potentially shared {@link org.springframework.expression.spel.support.StandardEvaluationContext}.
+	 * @param evaluationContextProvider {@link QueryMethodEvaluationContextProvider} used to access the potentially shared
+	 *          {@link org.springframework.expression.spel.support.StandardEvaluationContext}.
 	 * @see org.springframework.data.cassandra.repository.query.CassandraQueryMethod
 	 * @see org.springframework.data.cassandra.core.CassandraOperations
 	 */
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/query/StringBasedQuery.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/query/StringBasedQuery.java
index 7b33a6f0c..6b1e5eca2 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/query/StringBasedQuery.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/query/StringBasedQuery.java
@@ -223,7 +223,8 @@ class StringBasedQuery {
 							.expression(input.substring(exprStart + 3, currentPosition - 1), true));
 				} else {
 					if (matcher.pattern() == INDEX_PARAMETER_BINDING_PATTERN) {
-						bindings.add(ExpressionEvaluatingParameterBinder.ParameterBinding.indexed(Integer.parseInt(matcher.group(1))));
+						bindings
+								.add(ExpressionEvaluatingParameterBinder.ParameterBinding.indexed(Integer.parseInt(matcher.group(1))));
 					} else {
 						bindings.add(ExpressionEvaluatingParameterBinder.ParameterBinding.named(matcher.group(1)));
 					}
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/support/CassandraRepositoryFactory.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/support/CassandraRepositoryFactory.java
index c48238caa..a22bc5b19 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/support/CassandraRepositoryFactory.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/support/CassandraRepositoryFactory.java
@@ -120,7 +120,8 @@ public class CassandraRepositoryFactory extends RepositoryFactorySupport {
 
 		private final CassandraOperations operations;
 
-		CassandraQueryLookupStrategy(CassandraOperations operations, QueryMethodEvaluationContextProvider evaluationContextProvider,
+		CassandraQueryLookupStrategy(CassandraOperations operations,
+				QueryMethodEvaluationContextProvider evaluationContextProvider,
 				MappingContext, CassandraPersistentProperty> mappingContext) {
 
 			this.operations = operations;
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/support/InsertUtil.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/support/InsertUtil.java
index 632fa7e33..4a9d5cb09 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/support/InsertUtil.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/support/InsertUtil.java
@@ -15,12 +15,12 @@
  */
 package org.springframework.data.cassandra.repository.support;
 
+import lombok.experimental.UtilityClass;
+
 import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.Map.Entry;
 
-import lombok.experimental.UtilityClass;
-
 import org.springframework.data.cassandra.core.convert.CassandraConverter;
 import org.springframework.data.cassandra.core.mapping.CassandraPersistentEntity;
 
diff --git a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/support/MappingCassandraEntityInformation.java b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/support/MappingCassandraEntityInformation.java
index 1c58169a6..84484f648 100644
--- a/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/support/MappingCassandraEntityInformation.java
+++ b/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/support/MappingCassandraEntityInformation.java
@@ -65,8 +65,7 @@ public class MappingCassandraEntityInformation extends PersistentEntityIn
 
 		CassandraPersistentProperty idProperty = this.entityMetadata.getIdProperty();
 
-		return idProperty != null
-				? (ID) this.entityMetadata.getIdentifierAccessor(entity).getIdentifier()
+		return idProperty != null ? (ID) this.entityMetadata.getIdentifierAccessor(entity).getIdentifier()
 				: (ID) converter.getId(entity, entityMetadata);
 	}
 
diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/ReactiveCassandraTemplateIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/ReactiveCassandraTemplateIntegrationTests.java
index b749090ba..664aa0e2e 100644
--- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/ReactiveCassandraTemplateIntegrationTests.java
+++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/ReactiveCassandraTemplateIntegrationTests.java
@@ -87,7 +87,7 @@ public class ReactiveCassandraTemplateIntegrationTests extends AbstractKeyspaceC
 		Mono insert = template.insert(user);
 		verifyUser(user.getId()).verifyComplete();
 
-		StepVerifier.create(insert).expectNext(user).verifyComplete();
+		insert.as(StepVerifier::create).expectNext(user).verifyComplete();
 
 		verifyUser(user.getId()).expectNext(user).verifyComplete();
 	}
@@ -101,7 +101,7 @@ public class ReactiveCassandraTemplateIntegrationTests extends AbstractKeyspaceC
 
 		Mono> inserted = template.insert(user, lwtOptions);
 
-		StepVerifier.create(inserted).consumeNextWith(actual -> {
+		inserted.as(StepVerifier::create).consumeNextWith(actual -> {
 
 			assertThat(actual.wasApplied()).isTrue();
 			assertThat(actual.getEntity()).isSameAs(user);
@@ -115,12 +115,12 @@ public class ReactiveCassandraTemplateIntegrationTests extends AbstractKeyspaceC
 
 		User user = new User("heisenberg", "Walter", "White");
 
-		StepVerifier.create(template.insert(user, lwtOptions).map(WriteResult::wasApplied)).expectNext(true)
+		template.insert(user, lwtOptions).map(WriteResult::wasApplied).as(StepVerifier::create).expectNext(true)
 				.verifyComplete();
 
 		user.setFirstname("Walter Hartwell");
 
-		StepVerifier.create(template.insert(user, lwtOptions).map(WriteResult::wasApplied)).expectNext(false)
+		template.insert(user, lwtOptions).map(WriteResult::wasApplied).as(StepVerifier::create).expectNext(false)
 				.verifyComplete();
 
 		verifyUser(user.getId()).consumeNextWith(it -> assertThat(it.getFirstname()).isEqualTo("Walter")).verifyComplete();
@@ -131,9 +131,9 @@ public class ReactiveCassandraTemplateIntegrationTests extends AbstractKeyspaceC
 
 		User user = new User("heisenberg", "Walter", "White");
 
-		StepVerifier.create(template.insert(user)).expectNextCount(1).verifyComplete();
+		template.insert(user).as(StepVerifier::create).expectNextCount(1).verifyComplete();
 
-		StepVerifier.create(template.count(User.class)).expectNext(1L).verifyComplete();
+		template.count(User.class).as(StepVerifier::create).expectNext(1L).verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -141,13 +141,13 @@ public class ReactiveCassandraTemplateIntegrationTests extends AbstractKeyspaceC
 
 		User user = new User("heisenberg", "Walter", "White");
 
-		StepVerifier.create(template.insert(user)).expectNextCount(1).verifyComplete();
+		template.insert(user).as(StepVerifier::create).expectNextCount(1).verifyComplete();
 
-		StepVerifier.create(template.count(Query.query(where("id").is("heisenberg")), User.class)) //
+		template.count(Query.query(where("id").is("heisenberg")), User.class).as(StepVerifier::create) //
 				.expectNext(1L) //
 				.verifyComplete();
 
-		StepVerifier.create(template.count(Query.query(where("id").is("foo")), User.class)) //
+		template.count(Query.query(where("id").is("foo")), User.class).as(StepVerifier::create) //
 				.expectNext(0L) //
 				.verifyComplete();
 	}
@@ -157,13 +157,13 @@ public class ReactiveCassandraTemplateIntegrationTests extends AbstractKeyspaceC
 
 		User user = new User("heisenberg", "Walter", "White");
 
-		StepVerifier.create(template.insert(user)).expectNextCount(1).verifyComplete();
+		template.insert(user).as(StepVerifier::create).expectNextCount(1).verifyComplete();
 
-		StepVerifier.create(template.exists(Query.query(where("id").is("heisenberg")), User.class)) //
+		template.exists(Query.query(where("id").is("heisenberg")), User.class).as(StepVerifier::create) //
 				.expectNext(true) //
 				.verifyComplete();
 
-		StepVerifier.create(template.exists(Query.query(where("id").is("foo")), User.class)) //
+		template.exists(Query.query(where("id").is("foo")), User.class).as(StepVerifier::create) //
 				.expectNext(false) //
 				.verifyComplete();
 	}
@@ -173,11 +173,11 @@ public class ReactiveCassandraTemplateIntegrationTests extends AbstractKeyspaceC
 
 		User user = new User("heisenberg", "Walter", "White");
 
-		StepVerifier.create(template.insert(user)).expectNextCount(1).verifyComplete();
+		template.insert(user).as(StepVerifier::create).expectNextCount(1).verifyComplete();
 
 		user.setFirstname("Walter Hartwell");
 
-		StepVerifier.create(template.insert(user)).expectNextCount(1).verifyComplete();
+		template.insert(user).as(StepVerifier::create).expectNextCount(1).verifyComplete();
 
 		verifyUser(user.getId()).expectNext(user).verifyComplete();
 	}
@@ -189,7 +189,7 @@ public class ReactiveCassandraTemplateIntegrationTests extends AbstractKeyspaceC
 
 		User user = new User("heisenberg", "Walter", "White");
 
-		StepVerifier.create(template.update(user, lwtOptions).map(WriteResult::wasApplied)).expectNext(false)
+		template.update(user, lwtOptions).map(WriteResult::wasApplied).as(StepVerifier::create).expectNext(false)
 				.verifyComplete();
 
 		verifyUser(user.getId()).verifyComplete();
@@ -201,11 +201,11 @@ public class ReactiveCassandraTemplateIntegrationTests extends AbstractKeyspaceC
 		UpdateOptions lwtOptions = UpdateOptions.builder().withIfExists().build();
 
 		User user = new User("heisenberg", "Walter", "White");
-		StepVerifier.create(template.insert(user)).expectNextCount(1).verifyComplete();
+		template.insert(user).as(StepVerifier::create).expectNextCount(1).verifyComplete();
 
 		user.setFirstname("Walter Hartwell");
 
-		StepVerifier.create(template.update(user, lwtOptions)).expectNextCount(1).verifyComplete();
+		template.update(user, lwtOptions).as(StepVerifier::create).expectNextCount(1).verifyComplete();
 
 		verifyUser(user.getId()).consumeNextWith(it -> assertThat(it.getFirstname()).isEqualTo("Walter Hartwell"))
 				.verifyComplete();
@@ -257,9 +257,9 @@ public class ReactiveCassandraTemplateIntegrationTests extends AbstractKeyspaceC
 
 		User user = new User("heisenberg", "Walter", "White");
 
-		StepVerifier.create(template.insert(user)).expectNextCount(1).verifyComplete();
+		template.insert(user).as(StepVerifier::create).expectNextCount(1).verifyComplete();
 
-		StepVerifier.create(template.delete(user)).expectNext(user).verifyComplete();
+		template.delete(user).as(StepVerifier::create).expectNext(user).verifyComplete();
 
 		verifyUser(user.getId()).verifyComplete();
 	}
@@ -269,9 +269,9 @@ public class ReactiveCassandraTemplateIntegrationTests extends AbstractKeyspaceC
 
 		User user = new User("heisenberg", "Walter", "White");
 
-		StepVerifier.create(template.insert(user)).expectNextCount(1).verifyComplete();
+		template.insert(user).as(StepVerifier::create).expectNextCount(1).verifyComplete();
 
-		StepVerifier.create(template.deleteById(user.getId(), User.class)).expectNext(true).verifyComplete();
+		template.deleteById(user.getId(), User.class).as(StepVerifier::create).expectNext(true).verifyComplete();
 
 		verifyUser(user.getId()).verifyComplete();
 	}
@@ -282,7 +282,7 @@ public class ReactiveCassandraTemplateIntegrationTests extends AbstractKeyspaceC
 		DeleteOptions lwtOptions = DeleteOptions.builder().withIfExists().build();
 
 		User user = new User("heisenberg", "Walter", "White");
-		StepVerifier.create(template.insert(user)).expectNextCount(1).verifyComplete();
+		template.insert(user).as(StepVerifier::create).expectNextCount(1).verifyComplete();
 
 		template.delete(user, lwtOptions).map(WriteResult::wasApplied) //
 				.as(StepVerifier::create) //
@@ -301,7 +301,7 @@ public class ReactiveCassandraTemplateIntegrationTests extends AbstractKeyspaceC
 		DeleteOptions lwtOptions = DeleteOptions.builder().withIfExists().build();
 
 		User user = new User("heisenberg", "Walter", "White");
-		StepVerifier.create(template.insert(user)).expectNextCount(1).verifyComplete();
+		template.insert(user).as(StepVerifier::create).expectNextCount(1).verifyComplete();
 
 		Query query = Query.query(where("id").is("heisenberg")).queryOptions(lwtOptions);
 
@@ -417,7 +417,7 @@ public class ReactiveCassandraTemplateIntegrationTests extends AbstractKeyspaceC
 	}
 
 	private FirstStep verifyUser(String userId) {
-		return StepVerifier.create(template.selectOneById(userId, User.class));
+		return template.selectOneById(userId, User.class).as(StepVerifier::create);
 	}
 
 	static class QueryListener implements LatencyTracker {
diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/ReactiveCassandraTemplateUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/ReactiveCassandraTemplateUnitTests.java
index 4aa979a53..f395319e4 100644
--- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/ReactiveCassandraTemplateUnitTests.java
+++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/ReactiveCassandraTemplateUnitTests.java
@@ -92,7 +92,7 @@ public class ReactiveCassandraTemplateUnitTests {
 		when(row.getObject(1)).thenReturn("Walter");
 		when(row.getObject(2)).thenReturn("White");
 
-		StepVerifier.create(template.select("SELECT * FROM users", User.class)) //
+		template.select("SELECT * FROM users", User.class).as(StepVerifier::create) //
 				.expectNext(new User("myid", "Walter", "White")) //
 				.verifyComplete();
 
@@ -105,7 +105,7 @@ public class ReactiveCassandraTemplateUnitTests {
 
 		when(reactiveResultSet.rows()).thenThrow(new NoHostAvailableException(Collections.emptyMap()));
 
-		StepVerifier.create(template.select("SELECT * FROM users", User.class)) //
+		template.select("SELECT * FROM users", User.class).as(StepVerifier::create) //
 				.consumeErrorWith(e -> {
 					assertThat(e).hasRootCauseInstanceOf(NoHostAvailableException.class);
 				}).verify();
@@ -126,7 +126,7 @@ public class ReactiveCassandraTemplateUnitTests {
 		when(row.getObject(1)).thenReturn("Walter");
 		when(row.getObject(2)).thenReturn("White");
 
-		StepVerifier.create(template.selectOneById("myid", User.class)) //
+		template.selectOneById("myid", User.class).as(StepVerifier::create) //
 				.expectNext(new User("myid", "Walter", "White")) //
 				.verifyComplete();
 
@@ -161,7 +161,7 @@ public class ReactiveCassandraTemplateUnitTests {
 
 		when(reactiveResultSet.rows()).thenReturn(Flux.just(row));
 
-		StepVerifier.create(template.exists("myid", User.class)).expectNext(true).verifyComplete();
+		template.exists("myid", User.class).as(StepVerifier::create).expectNext(true).verifyComplete();
 
 		verify(session).execute(statementCaptor.capture());
 		assertThat(statementCaptor.getValue().toString()).isEqualTo("SELECT * FROM users WHERE id='myid';");
@@ -172,7 +172,7 @@ public class ReactiveCassandraTemplateUnitTests {
 
 		when(reactiveResultSet.rows()).thenReturn(Flux.empty());
 
-		StepVerifier.create(template.exists("myid", User.class)).expectNext(false).verifyComplete();
+		template.exists("myid", User.class).as(StepVerifier::create).expectNext(false).verifyComplete();
 
 		verify(session).execute(statementCaptor.capture());
 		assertThat(statementCaptor.getValue().toString()).isEqualTo("SELECT * FROM users WHERE id='myid';");
@@ -183,7 +183,7 @@ public class ReactiveCassandraTemplateUnitTests {
 
 		when(reactiveResultSet.rows()).thenReturn(Flux.just(row));
 
-		StepVerifier.create(template.exists(Query.empty(), User.class)).expectNext(true).verifyComplete();
+		template.exists(Query.empty(), User.class).as(StepVerifier::create).expectNext(true).verifyComplete();
 
 		verify(session).execute(statementCaptor.capture());
 		assertThat(statementCaptor.getValue().toString()).isEqualTo("SELECT * FROM users LIMIT 1;");
@@ -194,7 +194,7 @@ public class ReactiveCassandraTemplateUnitTests {
 
 		when(reactiveResultSet.rows()).thenReturn(Flux.empty());
 
-		StepVerifier.create(template.exists(Query.empty(), User.class)).expectNext(false).verifyComplete();
+		template.exists(Query.empty(), User.class).as(StepVerifier::create).expectNext(false).verifyComplete();
 
 		verify(session).execute(statementCaptor.capture());
 		assertThat(statementCaptor.getValue().toString()).isEqualTo("SELECT * FROM users LIMIT 1;");
@@ -207,7 +207,7 @@ public class ReactiveCassandraTemplateUnitTests {
 		when(row.getLong(0)).thenReturn(42L);
 		when(columnDefinitions.size()).thenReturn(1);
 
-		StepVerifier.create(template.count(User.class)).expectNext(42L).verifyComplete();
+		template.count(User.class).as(StepVerifier::create).expectNext(42L).verifyComplete();
 
 		verify(session).execute(statementCaptor.capture());
 		assertThat(statementCaptor.getValue().toString()).isEqualTo("SELECT count(*) FROM users;");
@@ -220,7 +220,7 @@ public class ReactiveCassandraTemplateUnitTests {
 		when(row.getLong(0)).thenReturn(42L);
 		when(columnDefinitions.size()).thenReturn(1);
 
-		StepVerifier.create(template.count(Query.empty(), User.class)).expectNext(42L).verifyComplete();
+		template.count(Query.empty(), User.class).as(StepVerifier::create).expectNext(42L).verifyComplete();
 
 		verify(session).execute(statementCaptor.capture());
 		assertThat(statementCaptor.getValue().toString()).isEqualTo("SELECT COUNT(1) FROM users;");
@@ -233,7 +233,7 @@ public class ReactiveCassandraTemplateUnitTests {
 		when(reactiveResultSet.rows()).thenReturn(Flux.just(row));
 
 		User user = new User("heisenberg", "Walter", "White");
-		StepVerifier.create(template.insert(user)).expectNext(user).verifyComplete();
+		template.insert(user).as(StepVerifier::create).expectNext(user).verifyComplete();
 
 		verify(session).execute(statementCaptor.capture());
 		assertThat(statementCaptor.getValue().toString())
@@ -247,7 +247,7 @@ public class ReactiveCassandraTemplateUnitTests {
 		when(session.execute(any(Statement.class)))
 				.thenReturn(Mono.error(new NoHostAvailableException(Collections.emptyMap())));
 
-		StepVerifier.create(template.insert(new User("heisenberg", "Walter", "White"))) //
+		template.insert(new User("heisenberg", "Walter", "White")).as(StepVerifier::create) //
 				.consumeErrorWith(e -> {
 
 					assertThat(e).hasRootCauseInstanceOf(NoHostAvailableException.class);
@@ -262,7 +262,7 @@ public class ReactiveCassandraTemplateUnitTests {
 
 		User user = new User("heisenberg", "Walter", "White");
 
-		StepVerifier.create(template.update(user)).expectNext(user).verifyComplete();
+		template.update(user).as(StepVerifier::create).expectNext(user).verifyComplete();
 
 		verify(session).execute(statementCaptor.capture());
 		assertThat(statementCaptor.getValue().toString())
@@ -353,7 +353,7 @@ public class ReactiveCassandraTemplateUnitTests {
 
 		User user = new User("heisenberg", "Walter", "White");
 
-		StepVerifier.create(template.delete(user)).expectNext(user).verifyComplete();
+		template.delete(user).as(StepVerifier::create).expectNext(user).verifyComplete();
 
 		verify(session).execute(statementCaptor.capture());
 		assertThat(statementCaptor.getValue().toString()).isEqualTo("DELETE FROM users WHERE id='heisenberg';");
@@ -398,7 +398,7 @@ public class ReactiveCassandraTemplateUnitTests {
 	@Test // DATACASS-335
 	public void truncateShouldRemoveEntities() {
 
-		StepVerifier.create(template.truncate(User.class)).verifyComplete();
+		template.truncate(User.class).as(StepVerifier::create).verifyComplete();
 
 		verify(session).execute(statementCaptor.capture());
 		assertThat(statementCaptor.getValue().toString()).isEqualTo("TRUNCATE users;");
diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/ReactiveDeleteOperationSupportIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/ReactiveDeleteOperationSupportIntegrationTests.java
index bb54d1979..34afbe033 100644
--- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/ReactiveDeleteOperationSupportIntegrationTests.java
+++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/ReactiveDeleteOperationSupportIntegrationTests.java
@@ -82,7 +82,7 @@ public class ReactiveDeleteOperationSupportIntegrationTests extends AbstractKeys
 				.matching(query(where("id").is(han.id)))
 				.all();
 
-		StepVerifier.create(writeResult.map(WriteResult::wasApplied)).expectNext(true).verifyComplete();
+		writeResult.map(WriteResult::wasApplied).as(StepVerifier::create).expectNext(true).verifyComplete();
 	}
 
 	@Test // DATACASS-485
@@ -93,8 +93,8 @@ public class ReactiveDeleteOperationSupportIntegrationTests extends AbstractKeys
 				.matching(query(where("id").in(han.id, luke.id)))
 				.all();
 
-		StepVerifier.create(writeResult.map(WriteResult::wasApplied)).expectNext(true).verifyComplete();
-		StepVerifier.create(template.select(Query.empty(), Person.class)).verifyComplete();
+		writeResult.map(WriteResult::wasApplied).as(StepVerifier::create).expectNext(true).verifyComplete();
+		template.select(Query.empty(), Person.class).as(StepVerifier::create).verifyComplete();
 	}
 
 	@Data
diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/ReactiveInsertOperationSupportIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/ReactiveInsertOperationSupportIntegrationTests.java
index 9402b698c..c0e6acdca 100644
--- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/ReactiveInsertOperationSupportIntegrationTests.java
+++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/ReactiveInsertOperationSupportIntegrationTests.java
@@ -93,13 +93,13 @@ public class ReactiveInsertOperationSupportIntegrationTests extends AbstractKeys
 
 		Mono> writeResult = this.template.insert(Person.class).inTable("person").one(han);
 
-		StepVerifier.create(writeResult).consumeNextWith(actual -> {
+		writeResult.as(StepVerifier::create).consumeNextWith(actual -> {
 
 			assertThat(actual.wasApplied()).isTrue();
 			assertThat(actual.getEntity()).isSameAs(han);
 		}).verifyComplete();
 
-		StepVerifier.create(template.selectOneById(han.id, Person.class)).expectNext(han).verifyComplete();
+		template.selectOneById(han.id, Person.class).as(StepVerifier::create).expectNext(han).verifyComplete();
 	}
 
 	@Test // DATACASS-485, DATACASS-573
@@ -112,8 +112,8 @@ public class ReactiveInsertOperationSupportIntegrationTests extends AbstractKeys
 				.withOptions(InsertOptions.builder().withIfNotExists().build())
 				.one(han);
 
-		StepVerifier.create(writeResult).assertNext(it -> assertThat(it.wasApplied()).isTrue()).verifyComplete();
-		StepVerifier.create(template.selectOneById(han.id, Person.class)).expectNext(han).verifyComplete();
+		writeResult.as(StepVerifier::create).assertNext(it -> assertThat(it.wasApplied()).isTrue()).verifyComplete();
+		template.selectOneById(han.id, Person.class).as(StepVerifier::create).expectNext(han).verifyComplete();
 	}
 
 	@Data
diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/ReactiveSelectOperationSupportIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/ReactiveSelectOperationSupportIntegrationTests.java
index fcb18047e..165063d67 100644
--- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/ReactiveSelectOperationSupportIntegrationTests.java
+++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/ReactiveSelectOperationSupportIntegrationTests.java
@@ -104,7 +104,8 @@ public class ReactiveSelectOperationSupportIntegrationTests extends AbstractKeys
 
 		Flux result = this.template.query(Person.class).all();
 
-		StepVerifier.create(result.collectList()).assertNext(actual ->
+		result.collectList().as(StepVerifier::create)
+				.assertNext(actual ->
 			assertThat(actual).containsExactlyInAnyOrder(han, luke)
 		).verifyComplete();
 	}
@@ -114,7 +115,7 @@ public class ReactiveSelectOperationSupportIntegrationTests extends AbstractKeys
 
 		Flux result = this.template.query(Human.class).inTable("person").all();
 
-		StepVerifier.create(result).expectNextCount(2).verifyComplete();
+		result.as(StepVerifier::create).expectNextCount(2).verifyComplete();
 	}
 
 	@Test // DATACASS-485
@@ -122,7 +123,8 @@ public class ReactiveSelectOperationSupportIntegrationTests extends AbstractKeys
 
 		Flux result = this.template.query(Person.class).as(Jedi.class).all();
 
-		StepVerifier.create(result.collectList()).assertNext(actual ->
+		result.collectList().as(StepVerifier::create)
+				.assertNext(actual ->
 			assertThat(actual).hasOnlyElementsOfType(Jedi.class).hasSize(2)
 		).verifyComplete();
 	}
@@ -132,7 +134,8 @@ public class ReactiveSelectOperationSupportIntegrationTests extends AbstractKeys
 
 		Flux result = this.template.query(Person.class).as(PersonProjection.class).all();
 
-		StepVerifier.create(result.collectList()).assertNext(actual ->
+		result.collectList().as(StepVerifier::create)
+				.assertNext(actual ->
 			assertThat(actual).hasOnlyElementsOfType(PersonProjection.class).hasSize(2)
 		).verifyComplete();
 	}
@@ -142,7 +145,7 @@ public class ReactiveSelectOperationSupportIntegrationTests extends AbstractKeys
 
 		Flux result = this.template.query(Person.class).matching(queryLuke()).all();
 
-		StepVerifier.create(result).expectNext(luke).verifyComplete();
+		result.as(StepVerifier::create).expectNext(luke).verifyComplete();
 	}
 
 	@Test // DATACASS-485
@@ -150,7 +153,8 @@ public class ReactiveSelectOperationSupportIntegrationTests extends AbstractKeys
 
 		Flux result = this.template.query(Jedi.class).inTable("person").all();
 
-		StepVerifier.create(result.collectList()).assertNext(actual ->
+		result.collectList().as(StepVerifier::create)
+				.assertNext(actual ->
 			assertThat(actual).isNotEmpty().hasOnlyElementsOfType(Jedi.class)
 		).verifyComplete();
 	}
@@ -160,7 +164,7 @@ public class ReactiveSelectOperationSupportIntegrationTests extends AbstractKeys
 
 		Flux result = this.template.query(Human.class).inTable("person").matching(queryLuke()).all();
 
-		StepVerifier.create(result.collectList()).expectNextCount(1).verifyComplete();
+		result.collectList().as(StepVerifier::create).expectNextCount(1).verifyComplete();
 	}
 
 	@Test // DATACASS-485
@@ -168,7 +172,8 @@ public class ReactiveSelectOperationSupportIntegrationTests extends AbstractKeys
 
 		Flux result = this.template.query(Person.class).as(Jedi.class).all();
 
-		StepVerifier.create(result.collectList()).assertNext(actual ->
+		result.collectList().as(StepVerifier::create)
+				.assertNext(actual ->
 			assertThat(actual).isNotEmpty().hasOnlyElementsOfType(Jedi.class)
 		).verifyComplete();
 	}
@@ -178,7 +183,7 @@ public class ReactiveSelectOperationSupportIntegrationTests extends AbstractKeys
 
 		Mono result = this.template.query(Person.class).matching(queryLuke()).one();
 
-		StepVerifier.create(result).expectNext(luke).verifyComplete();
+		result.as(StepVerifier::create).expectNext(luke).verifyComplete();
 	}
 
 	@Test // DATACASS-485
@@ -186,7 +191,7 @@ public class ReactiveSelectOperationSupportIntegrationTests extends AbstractKeys
 
 		Mono result = this.template.query(Person.class).matching(querySpock()).one();
 
-		StepVerifier.create(result).verifyComplete();
+		result.as(StepVerifier::create).verifyComplete();
 	}
 
 	@Test // DATACASS-485
@@ -194,7 +199,7 @@ public class ReactiveSelectOperationSupportIntegrationTests extends AbstractKeys
 
 		Mono result = this.template.query(Person.class).one();
 
-		StepVerifier.create(result).expectError(IncorrectResultSizeDataAccessException.class).verify();
+		result.as(StepVerifier::create).expectError(IncorrectResultSizeDataAccessException.class).verify();
 	}
 
 	@Test // DATACASS-485
@@ -202,7 +207,7 @@ public class ReactiveSelectOperationSupportIntegrationTests extends AbstractKeys
 
 		Mono result = this.template.query(Person.class).matching(queryLuke()).first();
 
-		StepVerifier.create(result).expectNext(luke).verifyComplete();
+		result.as(StepVerifier::create).expectNext(luke).verifyComplete();
 	}
 
 	@Test // DATACASS-485
@@ -210,7 +215,7 @@ public class ReactiveSelectOperationSupportIntegrationTests extends AbstractKeys
 
 		Mono result = this.template.query(Person.class).first();
 
-		StepVerifier.create(result).assertNext(actual ->
+		result.as(StepVerifier::create).assertNext(actual ->
 			assertThat(actual).isIn(han, luke)
 		).verifyComplete();
 	}
@@ -224,7 +229,7 @@ public class ReactiveSelectOperationSupportIntegrationTests extends AbstractKeys
 				.matching(query(where("firstname").is("han")).withAllowFiltering())
 				.first();
 
-		StepVerifier.create(result).assertNext(actual -> {
+		result.as(StepVerifier::create).assertNext(actual -> {
 			assertThat(actual).isInstanceOf(PersonProjection.class);
 			assertThat(actual.getFirstname()).isEqualTo("han");
 		}).verifyComplete();
@@ -239,7 +244,7 @@ public class ReactiveSelectOperationSupportIntegrationTests extends AbstractKeys
 				.matching(query(where("firstname").is("han")).withAllowFiltering())
 				.first();
 
-		StepVerifier.create(result).assertNext(actual -> {
+		result.as(StepVerifier::create).assertNext(actual -> {
 			assertThat(actual).isInstanceOf(PersonSpELProjection.class);
 			assertThat(actual.getName()).isEqualTo("han");
 		}).verifyComplete();
@@ -250,7 +255,7 @@ public class ReactiveSelectOperationSupportIntegrationTests extends AbstractKeys
 
 		Mono count = this.template.query(Person.class).count();
 
-		StepVerifier.create(count).expectNext(2L).verifyComplete();
+		count.as(StepVerifier::create).expectNext(2L).verifyComplete();
 	}
 
 	@Test // DATACASS-485
@@ -261,7 +266,7 @@ public class ReactiveSelectOperationSupportIntegrationTests extends AbstractKeys
 				.matching(query(where("firstname").is(luke.getFirstname())).withAllowFiltering())
 				.count();
 
-		StepVerifier.create(count).expectNext(1L).verifyComplete();
+		count.as(StepVerifier::create).expectNext(1L).verifyComplete();
 	}
 
 	@Test // DATACASS-485
@@ -269,17 +274,17 @@ public class ReactiveSelectOperationSupportIntegrationTests extends AbstractKeys
 
 		Mono exists = this.template.query(Person.class).exists();
 
-		StepVerifier.create(exists).expectNext(true).verifyComplete();
+		exists.as(StepVerifier::create).expectNext(true).verifyComplete();
 	}
 
 	@Test // DATACASS-485
 	public void existsShouldReturnFalseIfNoElementExistsInCollection() {
 
-		StepVerifier.create(this.template.truncate(Person.class)).verifyComplete();
+		this.template.truncate(Person.class).as(StepVerifier::create).verifyComplete();
 
 		Mono exists = this.template.query(Person.class).exists();
 
-		StepVerifier.create(exists).expectNext(false).verifyComplete();
+		exists.as(StepVerifier::create).expectNext(false).verifyComplete();
 	}
 
 	@Test // DATACASS-485
@@ -287,7 +292,7 @@ public class ReactiveSelectOperationSupportIntegrationTests extends AbstractKeys
 
 		Mono exists = this.template.query(Person.class).matching(queryLuke()).exists();
 
-		StepVerifier.create(exists).expectNext(true).verifyComplete();
+		exists.as(StepVerifier::create).expectNext(true).verifyComplete();
 	}
 
 	@Test // DATACASS-485
@@ -295,7 +300,7 @@ public class ReactiveSelectOperationSupportIntegrationTests extends AbstractKeys
 
 		Mono exists = this.template.query(Person.class).matching(querySpock()).exists();
 
-		StepVerifier.create(exists).expectNext(false).verifyComplete();
+		exists.as(StepVerifier::create).expectNext(false).verifyComplete();
 	}
 
 	@Test // DATACASS-485
@@ -303,7 +308,8 @@ public class ReactiveSelectOperationSupportIntegrationTests extends AbstractKeys
 
 		Flux result = this.template.query(Person.class).as(Contact.class).all();
 
-		StepVerifier.create(result.collectList()).assertNext(actual ->
+		result.collectList().as(StepVerifier::create)
+				.assertNext(actual ->
 			assertThat(actual).allMatch(it -> it instanceof Person)
 		).verifyComplete();
 	}
diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/ReactiveUpdateOperationSupportIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/ReactiveUpdateOperationSupportIntegrationTests.java
index 38a266b6d..2456cac67 100644
--- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/ReactiveUpdateOperationSupportIntegrationTests.java
+++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/ReactiveUpdateOperationSupportIntegrationTests.java
@@ -98,7 +98,7 @@ public class ReactiveUpdateOperationSupportIntegrationTests extends AbstractKeys
 				.matching(queryHan())
 				.apply(update("firstname", "Han"));
 
-		StepVerifier.create(writeResult.map(WriteResult::wasApplied)).expectNext(true).verifyComplete();
+		writeResult.map(WriteResult::wasApplied).as(StepVerifier::create).expectNext(true).verifyComplete();
 	}
 
 	@Test // DATACASS-485
@@ -109,7 +109,7 @@ public class ReactiveUpdateOperationSupportIntegrationTests extends AbstractKeys
 				.matching(query(where("id").is(han.getId())))
 				.apply(update("name", "Han"));
 
-		StepVerifier.create(writeResult.map(WriteResult::wasApplied)).expectNext(true).verifyComplete();
+		writeResult.map(WriteResult::wasApplied).as(StepVerifier::create).expectNext(true).verifyComplete();
 
 		assertThat(this.admin.selectOne(queryHan(), Person.class))
 				.isNotEqualTo(han).hasFieldOrPropertyWithValue("firstname", "Han");
diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/cql/DefaultBridgedReactiveSessionIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/cql/DefaultBridgedReactiveSessionIntegrationTests.java
index 97bb16568..11656b546 100644
--- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/cql/DefaultBridgedReactiveSessionIntegrationTests.java
+++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/cql/DefaultBridgedReactiveSessionIntegrationTests.java
@@ -66,7 +66,7 @@ public class DefaultBridgedReactiveSessionIntegrationTests extends AbstractKeysp
 
 		assertThat(keyspace.getTable("users")).isNull();
 
-		StepVerifier.create(execution)
+		execution.as(StepVerifier::create)
 			.consumeNextWith(actual -> assertThat(actual.wasApplied()).isTrue())
 			.verifyComplete();
 
@@ -75,7 +75,7 @@ public class DefaultBridgedReactiveSessionIntegrationTests extends AbstractKeysp
 
 	@Test // DATACASS-335
 	public void executeShouldTransportExceptionsInMono() {
-		StepVerifier.create(reactiveSession.execute("INSERT INTO dummy;")).expectError(SyntaxError.class).verify();
+		reactiveSession.execute("INSERT INTO dummy;").as(StepVerifier::create).expectError(SyntaxError.class).verify();
 	}
 
 	@Test // DATACASS-335
@@ -84,8 +84,9 @@ public class DefaultBridgedReactiveSessionIntegrationTests extends AbstractKeysp
 		session.execute("CREATE TABLE users (\n" + "  userid text PRIMARY KEY,\n" + "  first_name text\n" + ");");
 		session.execute("INSERT INTO users (userid, first_name) VALUES ('White', 'Walter');");
 
-		StepVerifier.create(reactiveSession.execute("SELECT * FROM users;")).consumeNextWith(actual ->
-			StepVerifier.create(actual.rows()).consumeNextWith(row ->
+		reactiveSession.execute("SELECT * FROM users;").as(StepVerifier::create)
+				.consumeNextWith(actual -> actual.rows().as(StepVerifier::create)
+						.consumeNextWith(row ->
 				assertThat(row.getString("userid")).isEqualTo("White")).verifyComplete()).verifyComplete();
 	}
 
@@ -94,7 +95,7 @@ public class DefaultBridgedReactiveSessionIntegrationTests extends AbstractKeysp
 
 		session.execute("CREATE TABLE users (\n" + "  userid text PRIMARY KEY,\n" + "  first_name text\n" + ");");
 
-		StepVerifier.create(reactiveSession.prepare("INSERT INTO users (userid, first_name) VALUES (?, ?);"))
+		reactiveSession.prepare("INSERT INTO users (userid, first_name) VALUES (?, ?);").as(StepVerifier::create)
 			.consumeNextWith(actual ->
 				assertThat(actual.getQueryString()).isEqualTo("INSERT INTO users (userid, first_name) VALUES (?, ?);"))
 			.verifyComplete();
@@ -129,7 +130,7 @@ public class DefaultBridgedReactiveSessionIntegrationTests extends AbstractKeysp
 
 		Collection received = new ConcurrentLinkedQueue<>();
 
-		StepVerifier.create(execution.flatMapMany(ReactiveResultSet::rows).map(row -> row.getString(0)))
+		execution.flatMapMany(ReactiveResultSet::rows).map(row -> row.getString(0)).as(StepVerifier::create)
 				.recordWith(() -> received)
 				.expectNextCount(100)
 				.verifyComplete();
diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/cql/DefaultBridgedReactiveSessionUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/cql/DefaultBridgedReactiveSessionUnitTests.java
index 15dfb3a5b..a9d3dbe9f 100644
--- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/cql/DefaultBridgedReactiveSessionUnitTests.java
+++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/cql/DefaultBridgedReactiveSessionUnitTests.java
@@ -194,7 +194,7 @@ public class DefaultBridgedReactiveSessionUnitTests {
 
 		Flux flux = reactiveSession.execute(new SimpleStatement("")).flatMapMany(ReactiveResultSet::availableRows);
 
-		StepVerifier.create(flux).expectNextCount(10).verifyComplete();
+		flux.as(StepVerifier::create).expectNextCount(10).verifyComplete();
 
 		verify(rows, times(10)).next();
 		verify(future, times(1)).addListener(any(), any());
diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/cql/ReactiveCqlTemplateIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/cql/ReactiveCqlTemplateIntegrationTests.java
index b71792be6..40229d120 100644
--- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/cql/ReactiveCqlTemplateIntegrationTests.java
+++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/cql/ReactiveCqlTemplateIntegrationTests.java
@@ -62,7 +62,7 @@ public class ReactiveCqlTemplateIntegrationTests extends AbstractKeyspaceCreatin
 	@Test // DATACASS-335
 	public void executeShouldRemoveRecords() {
 
-		StepVerifier.create(template.execute("DELETE FROM user WHERE id = 'WHITE'")).expectNext(true).verifyComplete();
+		template.execute("DELETE FROM user WHERE id = 'WHITE'").as(StepVerifier::create).expectNext(true).verifyComplete();
 
 		assertThat(getSession().execute("SELECT * FROM user").one()).isNull();
 	}
@@ -70,7 +70,7 @@ public class ReactiveCqlTemplateIntegrationTests extends AbstractKeyspaceCreatin
 	@Test // DATACASS-335
 	public void queryForObjectShouldReturnFirstColumn() {
 
-		StepVerifier.create(template.queryForObject("SELECT id FROM user;", String.class)) //
+		template.queryForObject("SELECT id FROM user;", String.class).as(StepVerifier::create) //
 				.expectNext("WHITE") //
 				.verifyComplete();
 	}
@@ -78,7 +78,7 @@ public class ReactiveCqlTemplateIntegrationTests extends AbstractKeyspaceCreatin
 	@Test // DATACASS-335
 	public void queryForObjectShouldReturnMap() {
 
-		StepVerifier.create(template.queryForMap("SELECT * FROM user;")) //
+		template.queryForMap("SELECT * FROM user;").as(StepVerifier::create) //
 				.consumeNextWith(actual -> {
 
 					assertThat(actual).containsEntry("id", "WHITE").containsEntry("username", "Walter");
@@ -88,10 +88,9 @@ public class ReactiveCqlTemplateIntegrationTests extends AbstractKeyspaceCreatin
 	@Test // DATACASS-335
 	public void executeStatementShouldRemoveRecords() {
 
-		StepVerifier
-				.create(template.execute(QueryBuilder.delete() //
+		template.execute(QueryBuilder.delete() //
 						.from("user") //
-						.where(QueryBuilder.eq("id", "WHITE")))) //
+				.where(QueryBuilder.eq("id", "WHITE"))).as(StepVerifier::create) //
 				.expectNext(true) //
 				.verifyComplete();
 
@@ -101,10 +100,9 @@ public class ReactiveCqlTemplateIntegrationTests extends AbstractKeyspaceCreatin
 	@Test // DATACASS-335
 	public void queryForObjectStatementShouldReturnFirstColumn() {
 
-		StepVerifier
-				.create(template.queryForObject(QueryBuilder //
+		template.queryForObject(QueryBuilder //
 						.select("id") //
-						.from("user"), String.class)) //
+				.from("user"), String.class).as(StepVerifier::create) //
 				.expectNext("WHITE") //
 				.verifyComplete();
 	}
@@ -112,7 +110,7 @@ public class ReactiveCqlTemplateIntegrationTests extends AbstractKeyspaceCreatin
 	@Test // DATACASS-335
 	public void queryForObjectStatementShouldReturnMap() {
 
-		StepVerifier.create(template.queryForMap(QueryBuilder.select().from("user"))) //
+		template.queryForMap(QueryBuilder.select().from("user")).as(StepVerifier::create) //
 				.consumeNextWith(actual -> {
 
 					assertThat(actual).containsEntry("id", "WHITE").containsEntry("username", "Walter");
@@ -122,7 +120,8 @@ public class ReactiveCqlTemplateIntegrationTests extends AbstractKeyspaceCreatin
 	@Test // DATACASS-335
 	public void executeWithArgsShouldRemoveRecords() {
 
-		StepVerifier.create(template.execute("DELETE FROM user WHERE id = ?", "WHITE")).expectNext(true).verifyComplete();
+		template.execute("DELETE FROM user WHERE id = ?", "WHITE").as(StepVerifier::create).expectNext(true)
+				.verifyComplete();
 
 		assertThat(getSession().execute("SELECT * FROM user").one()).isNull();
 	}
@@ -130,7 +129,7 @@ public class ReactiveCqlTemplateIntegrationTests extends AbstractKeyspaceCreatin
 	@Test // DATACASS-335
 	public void queryForObjectWithArgsShouldReturnFirstColumn() {
 
-		StepVerifier.create(template.queryForObject("SELECT id FROM user WHERE id = ?;", String.class, "WHITE")) //
+		template.queryForObject("SELECT id FROM user WHERE id = ?;", String.class, "WHITE").as(StepVerifier::create) //
 				.expectNext("WHITE") //
 				.verifyComplete();
 	}
@@ -138,7 +137,7 @@ public class ReactiveCqlTemplateIntegrationTests extends AbstractKeyspaceCreatin
 	@Test // DATACASS-335
 	public void queryForObjectWithArgsShouldReturnMap() {
 
-		StepVerifier.create(template.queryForMap("SELECT * FROM user WHERE id = ?;", "WHITE")) //
+		template.queryForMap("SELECT * FROM user WHERE id = ?;", "WHITE").as(StepVerifier::create) //
 				.consumeNextWith(actual -> {
 
 					assertThat(actual).containsEntry("id", "WHITE").containsEntry("username", "Walter");
diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/cql/ReactiveCqlTemplateUnitTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/cql/ReactiveCqlTemplateUnitTests.java
index 912a4d88a..8a0300c8d 100644
--- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/cql/ReactiveCqlTemplateUnitTests.java
+++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/core/cql/ReactiveCqlTemplateUnitTests.java
@@ -91,7 +91,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		verify(session, never()).close();
 
-		StepVerifier.create(flux).expectNext("OK").verifyComplete();
+		flux.as(StepVerifier::create).expectNext("OK").verifyComplete();
 		verify(session).close();
 	}
 
@@ -102,7 +102,7 @@ public class ReactiveCqlTemplateUnitTests {
 			throw new InvalidQueryException("wrong query");
 		});
 
-		StepVerifier.create(flux).expectError(CassandraInvalidQueryException.class).verify();
+		flux.as(StepVerifier::create).expectError(CassandraInvalidQueryException.class).verify();
 	}
 
 	@Test // DATACASS-335
@@ -114,7 +114,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		verifyZeroInteractions(session);
 
-		StepVerifier.create(mono).expectNext(false).verifyComplete();
+		mono.as(StepVerifier::create).expectNext(false).verifyComplete();
 
 		verify(session).execute(any(Statement.class));
 	}
@@ -126,7 +126,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		Mono mono = template.execute("UPDATE user SET a = 'b';");
 
-		StepVerifier.create(mono).expectError(CassandraConnectionFailureException.class).verify();
+		mono.as(StepVerifier::create).expectError(CassandraConnectionFailureException.class).verify();
 	}
 
 	// -------------------------------------------------------------------------
@@ -138,7 +138,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		doTestStrings(null, null, null, reactiveCqlTemplate -> {
 
-			StepVerifier.create(reactiveCqlTemplate.execute("SELECT * from USERS")).expectNextCount(1).verifyComplete();
+			reactiveCqlTemplate.execute("SELECT * from USERS").as(StepVerifier::create).expectNextCount(1).verifyComplete();
 
 			verify(session).execute(any(Statement.class));
 		});
@@ -149,7 +149,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		doTestStrings(5, ConsistencyLevel.ONE, DowngradingConsistencyRetryPolicy.INSTANCE, reactiveCqlTemplate -> {
 
-			StepVerifier.create(reactiveCqlTemplate.execute("SELECT * from USERS")) //
+			reactiveCqlTemplate.execute("SELECT * from USERS").as(StepVerifier::create) //
 					.expectNextCount(1) //
 					.verifyComplete();
 
@@ -164,7 +164,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 			Mono mono = reactiveCqlTemplate.queryForResultSet("SELECT * from USERS");
 
-			StepVerifier.create(mono.flatMapMany(ReactiveResultSet::rows)).expectNextCount(3).verifyComplete();
+			mono.flatMapMany(ReactiveResultSet::rows).as(StepVerifier::create).expectNextCount(3).verifyComplete();
 
 			verify(session).execute(any(Statement.class));
 		});
@@ -177,7 +177,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 			Flux flux = reactiveCqlTemplate.query("SELECT * from USERS", (row, index) -> row.getString(0));
 
-			StepVerifier.create(flux).expectNext("Walter", "Hank", " Jesse").verifyComplete();
+			flux.as(StepVerifier::create).expectNext("Walter", "Hank", " Jesse").verifyComplete();
 
 			verify(session).execute(any(Statement.class));
 		});
@@ -190,7 +190,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 			Flux flux = reactiveCqlTemplate.query("SELECT * from USERS", (row, index) -> row.getString(0));
 
-			StepVerifier.create(flux).expectNext("Walter", "Hank", " Jesse").verifyComplete();
+			flux.as(StepVerifier::create).expectNext("Walter", "Hank", " Jesse").verifyComplete();
 
 			verify(session).execute(any(Statement.class));
 		});
@@ -206,7 +206,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		verifyZeroInteractions(session);
 
-		StepVerifier.create(flux).expectNext(true).verifyComplete();
+		flux.as(StepVerifier::create).expectNext(true).verifyComplete();
 
 		verify(session).execute(any(Statement.class));
 	}
@@ -218,7 +218,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		Flux flux = template.query("UPDATE user SET a = 'b';", resultSet -> Mono.just(resultSet.wasApplied()));
 
-		StepVerifier.create(flux).expectError(CassandraConnectionFailureException.class).verify();
+		flux.as(StepVerifier::create).expectError(CassandraConnectionFailureException.class).verify();
 	}
 
 	@Test // DATACASS-335
@@ -229,7 +229,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		Mono mono = template.queryForObject("SELECT * FROM user", (row, rowNum) -> "OK");
 
-		StepVerifier.create(mono).verifyComplete();
+		mono.as(StepVerifier::create).verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -240,7 +240,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		Mono mono = template.queryForObject("SELECT * FROM user", (row, rowNum) -> "OK");
 
-		StepVerifier.create(mono).expectNext("OK").verifyComplete();
+		mono.as(StepVerifier::create).expectNext("OK").verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -251,7 +251,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		Mono mono = template.queryForObject("SELECT * FROM user", (row, rowNum) -> null);
 
-		StepVerifier.create(mono).verifyComplete();
+		mono.as(StepVerifier::create).verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -262,7 +262,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		Mono mono = template.queryForObject("SELECT * FROM user", (row, rowNum) -> "OK");
 
-		StepVerifier.create(mono).expectError(IncorrectResultSizeDataAccessException.class).verify();
+		mono.as(StepVerifier::create).expectError(IncorrectResultSizeDataAccessException.class).verify();
 	}
 
 	@Test // DATACASS-335
@@ -276,7 +276,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		Mono mono = template.queryForObject("SELECT * FROM user", String.class);
 
-		StepVerifier.create(mono).expectNext("OK").verifyComplete();
+		mono.as(StepVerifier::create).expectNext("OK").verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -290,7 +290,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		Flux flux = template.queryForFlux("SELECT * FROM user", String.class);
 
-		StepVerifier.create(flux).expectNext("OK", "NOT OK").verifyComplete();
+		flux.as(StepVerifier::create).expectNext("OK", "NOT OK").verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -301,7 +301,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		Flux flux = template.queryForRows("SELECT * FROM user");
 
-		StepVerifier.create(flux).expectNext(row, row).verifyComplete();
+		flux.as(StepVerifier::create).expectNext(row, row).verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -312,7 +312,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		Mono mono = template.execute("UPDATE user SET a = 'b';");
 
-		StepVerifier.create(mono).expectNext(true).verifyComplete();
+		mono.as(StepVerifier::create).expectNext(true).verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -325,7 +325,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		verifyZeroInteractions(session);
 
-		StepVerifier.create(flux).expectNext(true).expectNext(false).verifyComplete();
+		flux.as(StepVerifier::create).expectNext(true).expectNext(false).verifyComplete();
 
 		verify(session, times(2)).execute(any(Statement.class));
 	}
@@ -339,7 +339,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		doTestStrings(null, null, null, reactiveCqlTemplate -> {
 
-			StepVerifier.create(reactiveCqlTemplate.execute(new SimpleStatement("SELECT * from USERS"))) //
+			reactiveCqlTemplate.execute(new SimpleStatement("SELECT * from USERS")).as(StepVerifier::create) //
 					.expectNextCount(1) //
 					.verifyComplete();
 
@@ -352,7 +352,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		doTestStrings(5, ConsistencyLevel.ONE, DowngradingConsistencyRetryPolicy.INSTANCE, reactiveCqlTemplate -> {
 
-			StepVerifier.create(reactiveCqlTemplate.execute(new SimpleStatement("SELECT * from USERS"))) //
+			reactiveCqlTemplate.execute(new SimpleStatement("SELECT * from USERS")).as(StepVerifier::create) //
 					.expectNextCount(1) //
 					.verifyComplete();
 
@@ -365,9 +365,8 @@ public class ReactiveCqlTemplateUnitTests {
 
 		doTestStrings(null, null, null, reactiveCqlTemplate -> {
 
-			StepVerifier
-					.create(reactiveCqlTemplate.queryForResultSet(new SimpleStatement("SELECT * from USERS"))
-							.flatMapMany(ReactiveResultSet::rows)) //
+			reactiveCqlTemplate.queryForResultSet(new SimpleStatement("SELECT * from USERS"))
+					.flatMapMany(ReactiveResultSet::rows).as(StepVerifier::create) //
 					.expectNextCount(3) //
 					.verifyComplete();
 
@@ -383,7 +382,7 @@ public class ReactiveCqlTemplateUnitTests {
 			Flux flux = reactiveCqlTemplate.query(new SimpleStatement("SELECT * from USERS"),
 					(row, index) -> row.getString(0));
 
-			StepVerifier.create(flux).expectNext("Walter", "Hank", " Jesse").verifyComplete();
+			flux.as(StepVerifier::create).expectNext("Walter", "Hank", " Jesse").verifyComplete();
 
 			verify(session).execute(any(Statement.class));
 		});
@@ -397,7 +396,7 @@ public class ReactiveCqlTemplateUnitTests {
 			Flux flux = reactiveCqlTemplate.query(new SimpleStatement("SELECT * from USERS"),
 					(row, index) -> row.getString(0));
 
-			StepVerifier.create(flux.collectList()).consumeNextWith(rows -> {
+			flux.collectList().as(StepVerifier::create).consumeNextWith(rows -> {
 
 				assertThat(rows).hasSize(3).contains("Walter", "Hank", " Jesse");
 			}).verifyComplete();
@@ -416,7 +415,7 @@ public class ReactiveCqlTemplateUnitTests {
 				resultSet -> Mono.just(resultSet.wasApplied()));
 
 		verifyZeroInteractions(session);
-		StepVerifier.create(flux).expectNext(true).verifyComplete();
+		flux.as(StepVerifier::create).expectNext(true).verifyComplete();
 		verify(session).execute(any(Statement.class));
 	}
 
@@ -428,7 +427,7 @@ public class ReactiveCqlTemplateUnitTests {
 		Flux flux = template.query(new SimpleStatement("UPDATE user SET a = 'b';"),
 				resultSet -> Mono.just(resultSet.wasApplied()));
 
-		StepVerifier.create(flux).expectError(CassandraConnectionFailureException.class).verify();
+		flux.as(StepVerifier::create).expectError(CassandraConnectionFailureException.class).verify();
 	}
 
 	@Test // DATACASS-335
@@ -439,7 +438,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		Mono mono = template.queryForObject(new SimpleStatement("SELECT * FROM user"), (row, rowNum) -> "OK");
 
-		StepVerifier.create(mono).verifyComplete();
+		mono.as(StepVerifier::create).verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -450,7 +449,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		Mono mono = template.queryForObject(new SimpleStatement("SELECT * FROM user"), (row, rowNum) -> "OK");
 
-		StepVerifier.create(mono).expectNext("OK").verifyComplete();
+		mono.as(StepVerifier::create).expectNext("OK").verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -461,7 +460,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		Mono mono = template.queryForObject(new SimpleStatement("SELECT * FROM user"), (row, rowNum) -> null);
 
-		StepVerifier.create(mono).verifyComplete();
+		mono.as(StepVerifier::create).verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -472,7 +471,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		Mono mono = template.queryForObject(new SimpleStatement("SELECT * FROM user"), (row, rowNum) -> "OK");
 
-		StepVerifier.create(mono).expectError(IncorrectResultSizeDataAccessException.class).verify();
+		mono.as(StepVerifier::create).expectError(IncorrectResultSizeDataAccessException.class).verify();
 	}
 
 	@Test // DATACASS-335
@@ -486,7 +485,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		Mono mono = template.queryForObject(new SimpleStatement("SELECT * FROM user"), String.class);
 
-		StepVerifier.create(mono).expectNext("OK").verifyComplete();
+		mono.as(StepVerifier::create).expectNext("OK").verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -500,7 +499,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		Flux flux = template.queryForFlux(new SimpleStatement("SELECT * FROM user"), String.class);
 
-		StepVerifier.create(flux).expectNext("OK", "NOT OK").verifyComplete();
+		flux.as(StepVerifier::create).expectNext("OK", "NOT OK").verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -511,7 +510,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		Flux flux = template.queryForRows(new SimpleStatement("SELECT * FROM user"));
 
-		StepVerifier.create(flux).expectNext(row, row).verifyComplete();
+		flux.as(StepVerifier::create).expectNext(row, row).verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -520,7 +519,7 @@ public class ReactiveCqlTemplateUnitTests {
 		when(session.execute(any(Statement.class))).thenReturn(Mono.just(reactiveResultSet));
 		when(reactiveResultSet.wasApplied()).thenReturn(true);
 
-		StepVerifier.create(template.execute(new SimpleStatement("UPDATE user SET a = 'b';"))).expectNext(true)
+		template.execute(new SimpleStatement("UPDATE user SET a = 'b';")).as(StepVerifier::create).expectNext(true)
 				.verifyComplete();
 	}
 
@@ -538,7 +537,7 @@ public class ReactiveCqlTemplateUnitTests {
 				return session.execute(ps.bind("A")).flatMapMany(ReactiveResultSet::rows);
 			});
 
-			StepVerifier.create(flux).expectNextCount(3).verifyComplete();
+			flux.as(StepVerifier::create).expectNextCount(3).verifyComplete();
 		});
 	}
 
@@ -551,7 +550,7 @@ public class ReactiveCqlTemplateUnitTests {
 			when(this.preparedStatement.bind("White")).thenReturn(this.boundStatement);
 			when(this.reactiveResultSet.wasApplied()).thenReturn(true);
 
-			StepVerifier.create(applied).expectNext(true).verifyComplete();
+			applied.as(StepVerifier::create).expectNext(true).verifyComplete();
 		});
 	}
 
@@ -567,7 +566,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		verifyZeroInteractions(session);
 
-		StepVerifier.create(flux).expectNext(reactiveResultSet).verifyComplete();
+		flux.as(StepVerifier::create).expectNext(reactiveResultSet).verifyComplete();
 
 		verify(session).prepare(anyString());
 		verify(session).execute(boundStatement);
@@ -583,7 +582,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		verifyZeroInteractions(session);
 
-		StepVerifier.create(flux).expectNext(reactiveResultSet).verifyComplete();
+		flux.as(StepVerifier::create).expectNext(reactiveResultSet).verifyComplete();
 
 		verify(session).execute(boundStatement);
 	}
@@ -595,7 +594,7 @@ public class ReactiveCqlTemplateUnitTests {
 			throw new NoHostAvailableException(Collections.emptyMap());
 		}, (session, ps) -> session.execute(boundStatement));
 
-		StepVerifier.create(flux).expectError(CassandraConnectionFailureException.class).verify();
+		flux.as(StepVerifier::create).expectError(CassandraConnectionFailureException.class).verify();
 	}
 
 	@Test // DATACASS-335
@@ -605,7 +604,7 @@ public class ReactiveCqlTemplateUnitTests {
 			throw new NoHostAvailableException(Collections.emptyMap());
 		});
 
-		StepVerifier.create(flux).expectError(CassandraConnectionFailureException.class).verify();
+		flux.as(StepVerifier::create).expectError(CassandraConnectionFailureException.class).verify();
 	}
 
 	@Test // DATACASS-335
@@ -619,7 +618,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		verifyZeroInteractions(session);
 
-		StepVerifier.create(flux).expectNext(row).verifyComplete();
+		flux.as(StepVerifier::create).expectNext(row).verifyComplete();
 		verify(preparedStatement).bind();
 	}
 
@@ -636,7 +635,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		verifyZeroInteractions(session);
 
-		StepVerifier.create(flux).expectNext(row).verifyComplete();
+		flux.as(StepVerifier::create).expectNext(row).verifyComplete();
 
 		verify(preparedStatement).bind("a", "b");
 	}
@@ -654,7 +653,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		verifyZeroInteractions(session);
 
-		StepVerifier.create(flux).expectNext(row).verifyComplete();
+		flux.as(StepVerifier::create).expectNext(row).verifyComplete();
 
 		verify(preparedStatement).bind("a", "b");
 	}
@@ -670,7 +669,7 @@ public class ReactiveCqlTemplateUnitTests {
 		Mono mono = template.queryForObject("SELECT * FROM user WHERE username = ?", (row, rowNum) -> "OK",
 				"Walter");
 
-		StepVerifier.create(mono).verifyComplete();
+		mono.as(StepVerifier::create).verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -684,7 +683,7 @@ public class ReactiveCqlTemplateUnitTests {
 		Mono mono = template.queryForObject("SELECT * FROM user WHERE username = ?", (row, rowNum) -> "OK",
 				"Walter");
 
-		StepVerifier.create(mono).expectNext("OK").verifyComplete();
+		mono.as(StepVerifier::create).expectNext("OK").verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -698,7 +697,7 @@ public class ReactiveCqlTemplateUnitTests {
 		Mono mono = template.queryForObject("SELECT * FROM user WHERE username = ?", (row, rowNum) -> "OK",
 				"Walter");
 
-		StepVerifier.create(mono).expectError(IncorrectResultSizeDataAccessException.class).verify();
+		mono.as(StepVerifier::create).expectError(IncorrectResultSizeDataAccessException.class).verify();
 	}
 
 	@Test // DATACASS-335
@@ -714,7 +713,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		Mono mono = template.queryForObject("SELECT * FROM user WHERE username = ?", String.class, "Walter");
 
-		StepVerifier.create(mono).expectNext("OK").verifyComplete();
+		mono.as(StepVerifier::create).expectNext("OK").verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -730,7 +729,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		Flux flux = template.queryForFlux("SELECT * FROM user WHERE username = ?", String.class, "Walter");
 
-		StepVerifier.create(flux).expectNext("OK", "NOT OK").verifyComplete();
+		flux.as(StepVerifier::create).expectNext("OK", "NOT OK").verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -743,7 +742,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		Flux flux = template.queryForRows("SELECT * FROM user WHERE username = ?", "Walter");
 
-		StepVerifier.create(flux).expectNextCount(2).verifyComplete();
+		flux.as(StepVerifier::create).expectNextCount(2).verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -756,7 +755,7 @@ public class ReactiveCqlTemplateUnitTests {
 
 		Mono mono = template.execute("UPDATE user SET username = ?", "Walter");
 
-		StepVerifier.create(mono).expectNext(true).verifyComplete();
+		mono.as(StepVerifier::create).expectNext(true).verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -771,7 +770,7 @@ public class ReactiveCqlTemplateUnitTests {
 		Flux flux = template.execute("UPDATE user SET username = ?",
 				Flux.just(new Object[] { "Walter" }, new Object[] { "Hank" }));
 
-		StepVerifier.create(flux).expectNext(true, true).verifyComplete();
+		flux.as(StepVerifier::create).expectNext(true, true).verifyComplete();
 
 		verify(session, atMost(1)).prepare("UPDATE user SET username = ?");
 		verify(session, times(2)).execute(boundStatement);
diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/ConvertingReactiveCassandraRepositoryTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/ConvertingReactiveCassandraRepositoryTests.java
index 61a091102..558ca72a0 100644
--- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/ConvertingReactiveCassandraRepositoryTests.java
+++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/ConvertingReactiveCassandraRepositoryTests.java
@@ -89,20 +89,20 @@ public class ConvertingReactiveCassandraRepositoryTests extends AbstractKeyspace
 			Thread.sleep(500);
 		}
 
-		StepVerifier.create(reactiveRepository.deleteAll()).verifyComplete();
+		reactiveRepository.deleteAll().as(StepVerifier::create).verifyComplete();
 
 		dave = new User("42", "Dave", "Matthews");
 		oliver = new User("4", "Oliver August", "Matthews");
 		carter = new User("49", "Carter", "Beauford");
 		boyd = new User("45", "Boyd", "Tinsley");
 
-		StepVerifier.create(reactiveRepository.saveAll(Arrays.asList(oliver, dave, carter, boyd))).expectNextCount(4)
+		reactiveRepository.saveAll(Arrays.asList(oliver, dave, carter, boyd)).as(StepVerifier::create).expectNextCount(4)
 				.verifyComplete();
 	}
 
 	@Test // DATACASS-335
 	public void reactiveStreamsMethodsShouldWork() {
-		StepVerifier.create(reactiveUserRepostitory.existsById(dave.getId())).expectNext(true).verifyComplete();
+		reactiveUserRepostitory.existsById(dave.getId()).as(StepVerifier::create).expectNext(true).verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -113,11 +113,12 @@ public class ConvertingReactiveCassandraRepositoryTests extends AbstractKeyspace
 	@Test // DATACASS-360
 	public void dtoProjectionShouldWork() {
 
-		StepVerifier.create(reactiveUserRepostitory.findProjectedByLastname(boyd.getLastname())).consumeNextWith(actual -> {
+		reactiveUserRepostitory.findProjectedByLastname(boyd.getLastname()).as(StepVerifier::create)
+				.consumeNextWith(actual -> {
 
-			assertThat(actual.firstname).isEqualTo(boyd.getFirstname());
-			assertThat(actual.lastname).isEqualTo(boyd.getLastname());
-		}).verifyComplete();
+					assertThat(actual.firstname).isEqualTo(boyd.getFirstname());
+					assertThat(actual.lastname).isEqualTo(boyd.getLastname());
+				}).verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -264,7 +265,7 @@ public class ConvertingReactiveCassandraRepositoryTests extends AbstractKeyspace
 	@Test // DATACASS-335
 	public void shouldFindByIdByPublisherOfLastName() {
 
-		StepVerifier.create(reactiveRepository.findByLastname(Single.just(this.carter.getLastname()))) //
+		reactiveRepository.findByLastname(Single.just(this.carter.getLastname())).as(StepVerifier::create) //
 				.expectNext(carter) //
 				.verifyComplete();
 	}
diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/ReactiveCassandraRepositoryIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/ReactiveCassandraRepositoryIntegrationTests.java
index 9e3406dd7..3d95b09e7 100644
--- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/ReactiveCassandraRepositoryIntegrationTests.java
+++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/ReactiveCassandraRepositoryIntegrationTests.java
@@ -116,64 +116,66 @@ public class ReactiveCassandraRepositoryIntegrationTests extends AbstractKeyspac
 		repository = factory.getRepository(UserRepository.class);
 		groupRepostitory = factory.getRepository(GroupRepository.class);
 
-		StepVerifier.create(repository.deleteAll().concatWith(groupRepostitory.deleteAll())).verifyComplete();
+		repository.deleteAll().concatWith(groupRepostitory.deleteAll()).as(StepVerifier::create).verifyComplete();
 
 		dave = new User("42", "Dave", "Matthews");
 		oliver = new User("4", "Oliver August", "Matthews");
 		carter = new User("49", "Carter", "Beauford");
 		boyd = new User("45", "Boyd", "Tinsley");
 
-		StepVerifier.create(repository.saveAll(Arrays.asList(oliver, dave, carter, boyd))).expectNextCount(4)
+		repository.saveAll(Arrays.asList(oliver, dave, carter, boyd)).as(StepVerifier::create).expectNextCount(4)
 				.verifyComplete();
 	}
 
 	@Test // DATACASS-335
 	public void shouldFindByLastName() {
-		StepVerifier.create(repository.findByLastname(dave.getLastname())).expectNextCount(2).verifyComplete();
+		repository.findByLastname(dave.getLastname()).as(StepVerifier::create).expectNextCount(2).verifyComplete();
 	}
 
 	@Test //DATACASS-529
 	public void shouldFindSliceByLastName() {
-		StepVerifier.create(repository.findByLastname(carter.getLastname(), CassandraPageRequest.first(1)))
+		repository.findByLastname(carter.getLastname(), CassandraPageRequest.first(1)).as(StepVerifier::create)
 				.expectNextMatches(users -> users.getSize() == 1 && users.hasNext())
 				.verifyComplete();
 	}
 
 	@Test // DATACASS-529
 	public void shouldFindEmpptySliceByLastName() {
-		StepVerifier.create(repository.findByLastname("foo", CassandraPageRequest.first(1)))
+		repository.findByLastname("foo", CassandraPageRequest.first(1)).as(StepVerifier::create)
 				.expectNextMatches(Streamable::isEmpty).verifyComplete();
 	}
 
 	@Test // DATACASS-525
 	public void findOneWithManyResultsShouldFail() {
-		StepVerifier.create(repository.findOneByLastname(dave.getLastname()))
+		repository.findOneByLastname(dave.getLastname()).as(StepVerifier::create)
 				.expectError(IncorrectResultSizeDataAccessException.class).verify();
 	}
 
 	@Test // DATACASS-525
 	public void findOneWithNoResultsShouldNotEmitItem() {
-		StepVerifier.create(repository.findByLastname("foo")).verifyComplete();
+		repository.findByLastname("foo").as(StepVerifier::create).verifyComplete();
 	}
 
 	@Test // DATACASS-525
 	public void findFirstWithManyResultsShouldEmitFirstItem() {
-		StepVerifier.create(repository.findFirstByLastname(dave.getLastname())).expectNextCount(1).verifyComplete();
+		repository.findFirstByLastname(dave.getLastname()).as(StepVerifier::create).expectNextCount(1).verifyComplete();
 	}
 
 	@Test // DATACASS-335
 	public void shouldFindByIdByLastName() {
-		StepVerifier.create(repository.findOneByLastname(carter.getLastname())).expectNext(carter).verifyComplete();
+		repository.findOneByLastname(carter.getLastname()).as(StepVerifier::create).expectNext(carter).verifyComplete();
 	}
 
 	@Test // DATACASS-335
 	public void shouldFindByIdByPublisherOfLastName() {
-		StepVerifier.create(repository.findByLastname(Mono.just(carter.getLastname()))).expectNext(carter).verifyComplete();
+		repository.findByLastname(Mono.just(carter.getLastname())).as(StepVerifier::create).expectNext(carter)
+				.verifyComplete();
 	}
 
 	@Test // DATACASS-335
 	public void shouldFindUsingPublishersInStringQuery() {
-		StepVerifier.create(repository.findStringQuery(Mono.just(dave.getLastname()))).expectNextCount(2).verifyComplete();
+		repository.findStringQuery(Mono.just(dave.getLastname())).as(StepVerifier::create).expectNextCount(2)
+				.verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -182,17 +184,16 @@ public class ReactiveCassandraRepositoryIntegrationTests extends AbstractKeyspac
 		GroupKey key1 = new GroupKey("Simpsons", "hash", "Bart");
 		GroupKey key2 = new GroupKey("Simpsons", "hash", "Homer");
 
-		StepVerifier.create(groupRepostitory.saveAll(Flux.just(new Group(key1), new Group(key2)))).expectNextCount(2)
+		groupRepostitory.saveAll(Flux.just(new Group(key1), new Group(key2))).as(StepVerifier::create).expectNextCount(2)
 				.verifyComplete();
 
-		StepVerifier
-				.create(groupRepostitory.findByIdGroupnameAndIdHashPrefix("Simpsons", "hash",
-						Sort.by("id.username").ascending())) //
+		groupRepostitory.findByIdGroupnameAndIdHashPrefix("Simpsons", "hash", Sort.by("id.username").ascending())
+				.as(StepVerifier::create) //
 				.expectNext(new Group(key1), new Group(key2)) //
 				.verifyComplete();
 
-		StepVerifier.create(groupRepostitory.findByIdGroupnameAndIdHashPrefix("Simpsons", "hash",
-					Sort.by("id.username").descending()))
+		groupRepostitory.findByIdGroupnameAndIdHashPrefix("Simpsons", "hash", Sort.by("id.username").descending())
+				.as(StepVerifier::create)
 				.expectNext(new Group(key2), new Group(key1)) //
 				.verifyComplete();
 	}
@@ -200,21 +201,21 @@ public class ReactiveCassandraRepositoryIntegrationTests extends AbstractKeyspac
 	@Test // DATACASS-512
 	public void shouldCountRecords() {
 
-		StepVerifier.create(repository.countByLastname("Matthews")).expectNext(2L).verifyComplete();
-		StepVerifier.create(repository.countByLastname("None")).expectNext(0L).verifyComplete();
+		repository.countByLastname("Matthews").as(StepVerifier::create).expectNext(2L).verifyComplete();
+		repository.countByLastname("None").as(StepVerifier::create).expectNext(0L).verifyComplete();
 
-		StepVerifier.create(repository.countQueryByLastname("Matthews")).expectNext(2L).verifyComplete();
-		StepVerifier.create(repository.countQueryByLastname("None")).expectNext(0L).verifyComplete();
+		repository.countQueryByLastname("Matthews").as(StepVerifier::create).expectNext(2L).verifyComplete();
+		repository.countQueryByLastname("None").as(StepVerifier::create).expectNext(0L).verifyComplete();
 	}
 
 	@Test // DATACASS-512
 	public void shouldApplyExistsProjection() {
 
-		StepVerifier.create(repository.existsByLastname("Matthews")).expectNext(true).verifyComplete();
-		StepVerifier.create(repository.existsByLastname("None")).expectNext(false).verifyComplete();
+		repository.existsByLastname("Matthews").as(StepVerifier::create).expectNext(true).verifyComplete();
+		repository.existsByLastname("None").as(StepVerifier::create).expectNext(false).verifyComplete();
 
-		StepVerifier.create(repository.existsQueryByLastname("Matthews")).expectNext(true).verifyComplete();
-		StepVerifier.create(repository.existsQueryByLastname("None")).expectNext(false).verifyComplete();
+		repository.existsQueryByLastname("Matthews").as(StepVerifier::create).expectNext(true).verifyComplete();
+		repository.existsQueryByLastname("None").as(StepVerifier::create).expectNext(false).verifyComplete();
 	}
 
 	interface UserRepository extends ReactiveCassandraRepository {
diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/support/SimpleReactiveCassandraRepositoryIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/support/SimpleReactiveCassandraRepositoryIntegrationTests.java
index 7919b1082..cbec14adc 100644
--- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/support/SimpleReactiveCassandraRepositoryIntegrationTests.java
+++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/repository/support/SimpleReactiveCassandraRepositoryIntegrationTests.java
@@ -101,12 +101,12 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK
 	}
 
 	private void insertTestData() {
-		StepVerifier.create(repository.saveAll(Arrays.asList(oliver, dave, carter, boyd))).expectNextCount(4)
+		repository.saveAll(Arrays.asList(oliver, dave, carter, boyd)).as(StepVerifier::create).expectNextCount(4)
 				.verifyComplete();
 	}
 
 	private void deleteAll() {
-		StepVerifier.create(repository.deleteAll()).verifyComplete();
+		repository.deleteAll().as(StepVerifier::create).verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -114,12 +114,12 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK
 
 		insertTestData();
 
-		StepVerifier.create(repository.existsById(dave.getId())).expectNext(true).verifyComplete();
+		repository.existsById(dave.getId()).as(StepVerifier::create).expectNext(true).verifyComplete();
 	}
 
 	@Test // DATACASS-335
 	public void existsByIdShouldReturnFalseForAbsentObject() {
-		StepVerifier.create(repository.existsById("unknown")).expectNext(false).verifyComplete();
+		repository.existsById("unknown").as(StepVerifier::create).expectNext(false).verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -127,7 +127,7 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK
 
 		insertTestData();
 
-		StepVerifier.create(repository.existsById(Mono.just(dave.getId()))).expectNext(true).verifyComplete();
+		repository.existsById(Mono.just(dave.getId())).as(StepVerifier::create).expectNext(true).verifyComplete();
 	}
 
 	@Test // DATACASS-462
@@ -135,13 +135,13 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK
 
 		insertTestData();
 
-		StepVerifier.create(repository.existsById(Flux.just(dave.getId(), oliver.getId()))).expectNext(true)
+		repository.existsById(Flux.just(dave.getId(), oliver.getId())).as(StepVerifier::create).expectNext(true)
 				.verifyComplete();
 	}
 
 	@Test // DATACASS-335
 	public void existsByEmptyMonoOfIdShouldReturnEmptyMono() {
-		StepVerifier.create(repository.existsById(Mono.empty())).verifyComplete();
+		repository.existsById(Mono.empty()).as(StepVerifier::create).verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -149,12 +149,12 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK
 
 		insertTestData();
 
-		StepVerifier.create(repository.findById(dave.getId())).expectNext(dave).verifyComplete();
+		repository.findById(dave.getId()).as(StepVerifier::create).expectNext(dave).verifyComplete();
 	}
 
 	@Test // DATACASS-335
 	public void findByIdShouldCompleteWithoutValueForAbsentObject() {
-		StepVerifier.create(repository.findById("unknown")).verifyComplete();
+		repository.findById("unknown").as(StepVerifier::create).verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -162,7 +162,7 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK
 
 		insertTestData();
 
-		StepVerifier.create(repository.findById(Mono.just(dave.getId()))).expectNext(dave).verifyComplete();
+		repository.findById(Mono.just(dave.getId())).as(StepVerifier::create).expectNext(dave).verifyComplete();
 	}
 
 	@Test // DATACASS-462
@@ -170,12 +170,13 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK
 
 		insertTestData();
 
-		StepVerifier.create(repository.findById(Flux.just(dave.getId(), oliver.getId()))).expectNext(dave).verifyComplete();
+		repository.findById(Flux.just(dave.getId(), oliver.getId())).as(StepVerifier::create).expectNext(dave)
+				.verifyComplete();
 	}
 
 	@Test // DATACASS-335
 	public void findByIdByEmptyMonoOfIdShouldReturnEmptyMono() {
-		StepVerifier.create(repository.findById(Mono.empty())).verifyComplete();
+		repository.findById(Mono.empty()).as(StepVerifier::create).verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -183,7 +184,7 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK
 
 		insertTestData();
 
-		StepVerifier.create(repository.findAll()).expectNextCount(4).verifyComplete();
+		repository.findAll().as(StepVerifier::create).expectNextCount(4).verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -191,7 +192,7 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK
 
 		insertTestData();
 
-		StepVerifier.create(repository.findAllById(Arrays.asList(dave.getId(), boyd.getId()))) //
+		repository.findAllById(Arrays.asList(dave.getId(), boyd.getId())).as(StepVerifier::create) //
 				.expectNextCount(2) //
 				.verifyComplete();
 	}
@@ -201,14 +202,14 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK
 
 		insertTestData();
 
-		StepVerifier.create(repository.findAllById(Flux.just(dave.getId(), boyd.getId()))) //
+		repository.findAllById(Flux.just(dave.getId(), boyd.getId())).as(StepVerifier::create) //
 				.expectNextCount(2) //
 				.verifyComplete();
 	}
 
 	@Test // DATACASS-335
 	public void findAllByEmptyPublisherOfIdShouldReturnResults() {
-		StepVerifier.create(repository.findAllById(Flux.empty())).verifyComplete();
+		repository.findAllById(Flux.empty()).as(StepVerifier::create).verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -216,7 +217,7 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK
 
 		insertTestData();
 
-		StepVerifier.create(repository.count()).expectNext(4L).verifyComplete();
+		repository.count().as(StepVerifier::create).expectNext(4L).verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -224,9 +225,9 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK
 
 		User person = new User("36", "Homer", "Simpson");
 
-		StepVerifier.create(repository.insert(person)).expectNext(person).verifyComplete();
+		repository.insert(person).as(StepVerifier::create).expectNext(person).verifyComplete();
 
-		StepVerifier.create(repository.findAll()).expectNextCount(1L).verifyComplete();
+		repository.findAll().as(StepVerifier::create).expectNextCount(1L).verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -236,23 +237,23 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK
 
 		repository.insert(person);
 
-		StepVerifier.create(repository.findAll()).expectNextCount(0L).verifyComplete();
+		repository.findAll().as(StepVerifier::create).expectNextCount(0L).verifyComplete();
 	}
 
 	@Test // DATACASS-335
 	public void insertIterableOfEntitiesShouldInsertEntity() {
 
-		StepVerifier.create(repository.insert(Arrays.asList(dave, oliver, boyd))).expectNextCount(3L).verifyComplete();
+		repository.insert(Arrays.asList(dave, oliver, boyd)).as(StepVerifier::create).expectNextCount(3L).verifyComplete();
 
-		StepVerifier.create(repository.findAll()).expectNextCount(3L).verifyComplete();
+		repository.findAll().as(StepVerifier::create).expectNextCount(3L).verifyComplete();
 	}
 
 	@Test // DATACASS-335
 	public void insertPublisherOfEntitiesShouldInsertEntity() {
 
-		StepVerifier.create(repository.insert(Flux.just(dave, oliver, boyd))).expectNextCount(3L).verifyComplete();
+		repository.insert(Flux.just(dave, oliver, boyd)).as(StepVerifier::create).expectNextCount(3L).verifyComplete();
 
-		StepVerifier.create(repository.findAll()).expectNextCount(3L).verifyComplete();
+		repository.findAll().as(StepVerifier::create).expectNextCount(3L).verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -261,9 +262,9 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK
 		dave.setFirstname("Hello, Dave");
 		dave.setLastname("Bowman");
 
-		StepVerifier.create(repository.save(dave)).expectNextCount(1).verifyComplete();
+		repository.save(dave).as(StepVerifier::create).expectNextCount(1).verifyComplete();
 
-		StepVerifier.create(repository.findById(dave.getId())).consumeNextWith(actual -> {
+		repository.findById(dave.getId()).as(StepVerifier::create).consumeNextWith(actual -> {
 
 			assertThat(actual.getFirstname()).isEqualTo(dave.getFirstname());
 			assertThat(actual.getLastname()).isEqualTo(dave.getLastname());
@@ -275,17 +276,17 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK
 
 		User person = new User("36", "Homer", "Simpson");
 
-		StepVerifier.create(repository.save(person)).expectNextCount(1).verifyComplete();
+		repository.save(person).as(StepVerifier::create).expectNextCount(1).verifyComplete();
 
-		StepVerifier.create(repository.findById(person.getId())).expectNext(person).verifyComplete();
+		repository.findById(person.getId()).as(StepVerifier::create).expectNext(person).verifyComplete();
 	}
 
 	@Test // DATACASS-335
 	public void saveIterableOfNewEntitiesShouldInsertEntity() {
 
-		StepVerifier.create(repository.saveAll(Arrays.asList(dave, oliver, boyd))).expectNextCount(3).verifyComplete();
+		repository.saveAll(Arrays.asList(dave, oliver, boyd)).as(StepVerifier::create).expectNextCount(3).verifyComplete();
 
-		StepVerifier.create(repository.findAll()).expectNextCount(3L).verifyComplete();
+		repository.findAll().as(StepVerifier::create).expectNextCount(3L).verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -296,19 +297,19 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK
 		dave.setFirstname("Hello, Dave");
 		dave.setLastname("Bowman");
 
-		StepVerifier.create(repository.saveAll(Arrays.asList(person, dave))).expectNextCount(2).verifyComplete();
+		repository.saveAll(Arrays.asList(person, dave)).as(StepVerifier::create).expectNextCount(2).verifyComplete();
 
-		StepVerifier.create(repository.findById(dave.getId())).expectNext(dave).verifyComplete();
+		repository.findById(dave.getId()).as(StepVerifier::create).expectNext(dave).verifyComplete();
 
-		StepVerifier.create(repository.findById(person.getId())).expectNext(person).verifyComplete();
+		repository.findById(person.getId()).as(StepVerifier::create).expectNext(person).verifyComplete();
 	}
 
 	@Test // DATACASS-335
 	public void savePublisherOfEntitiesShouldInsertEntity() {
 
-		StepVerifier.create(repository.saveAll(Flux.just(dave, oliver, boyd))).expectNextCount(3).verifyComplete();
+		repository.saveAll(Flux.just(dave, oliver, boyd)).as(StepVerifier::create).expectNextCount(3).verifyComplete();
 
-		StepVerifier.create(repository.findAll()).expectNextCount(3L).verifyComplete();
+		repository.findAll().as(StepVerifier::create).expectNextCount(3L).verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -316,9 +317,9 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK
 
 		insertTestData();
 
-		StepVerifier.create(repository.deleteAll()).verifyComplete();
+		repository.deleteAll().as(StepVerifier::create).verifyComplete();
 
-		StepVerifier.create(repository.findAll()).verifyComplete();
+		repository.findAll().as(StepVerifier::create).verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -326,9 +327,9 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK
 
 		insertTestData();
 
-		StepVerifier.create(repository.deleteById(dave.getId())).verifyComplete();
+		repository.deleteById(dave.getId()).as(StepVerifier::create).verifyComplete();
 
-		StepVerifier.create(repository.findById(dave.getId())).expectNextCount(0).verifyComplete();
+		repository.findById(dave.getId()).as(StepVerifier::create).expectNextCount(0).verifyComplete();
 	}
 
 	@Test // DATACASS-462
@@ -336,9 +337,9 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK
 
 		insertTestData();
 
-		StepVerifier.create(repository.deleteById(Mono.just(dave.getId()))).verifyComplete();
+		repository.deleteById(Mono.just(dave.getId())).as(StepVerifier::create).verifyComplete();
 
-		StepVerifier.create(repository.existsById(dave.getId())).expectNext(false).verifyComplete();
+		repository.existsById(dave.getId()).as(StepVerifier::create).expectNext(false).verifyComplete();
 	}
 
 	@Test // DATACASS-462
@@ -346,10 +347,10 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK
 
 		insertTestData();
 
-		StepVerifier.create(repository.deleteById(Flux.just(dave.getId(), oliver.getId()))).verifyComplete();
+		repository.deleteById(Flux.just(dave.getId(), oliver.getId())).as(StepVerifier::create).verifyComplete();
 
-		StepVerifier.create(repository.existsById(dave.getId())).expectNext(false).verifyComplete();
-		StepVerifier.create(repository.existsById(oliver.getId())).expectNext(true).verifyComplete();
+		repository.existsById(dave.getId()).as(StepVerifier::create).expectNext(false).verifyComplete();
+		repository.existsById(oliver.getId()).as(StepVerifier::create).expectNext(true).verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -357,9 +358,9 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK
 
 		insertTestData();
 
-		StepVerifier.create(repository.delete(dave)).verifyComplete();
+		repository.delete(dave).as(StepVerifier::create).verifyComplete();
 
-		StepVerifier.create(repository.findById(dave.getId())).expectNextCount(0).verifyComplete();
+		repository.findById(dave.getId()).as(StepVerifier::create).expectNextCount(0).verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -367,9 +368,9 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK
 
 		insertTestData();
 
-		StepVerifier.create(repository.deleteAll(Arrays.asList(dave, boyd))).verifyComplete();
+		repository.deleteAll(Arrays.asList(dave, boyd)).as(StepVerifier::create).verifyComplete();
 
-		StepVerifier.create(repository.findById(boyd.getId())).expectNextCount(0).verifyComplete();
+		repository.findById(boyd.getId()).as(StepVerifier::create).expectNextCount(0).verifyComplete();
 	}
 
 	@Test // DATACASS-335
@@ -377,9 +378,9 @@ public class SimpleReactiveCassandraRepositoryIntegrationTests extends AbstractK
 
 		insertTestData();
 
-		StepVerifier.create(repository.deleteAll(Flux.just(dave, boyd))).verifyComplete();
+		repository.deleteAll(Flux.just(dave, boyd)).as(StepVerifier::create).verifyComplete();
 
-		StepVerifier.create(repository.findById(boyd.getId())).expectNextCount(0).verifyComplete();
+		repository.findById(boyd.getId()).as(StepVerifier::create).expectNextCount(0).verifyComplete();
 	}
 
 	interface UserRepostitory extends ReactiveCassandraRepository { }