From f293516ecdb35db083e4a181f1eb7b803ddaad88 Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 29 Aug 2016 16:08:30 -0700 Subject: [PATCH] DATACASS-217 - Polish. Original pull request: #82. --- ...ssandraCqlClusterFactoryBeanUnitTests.java | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/spring-cql/src/test/java/org/springframework/cassandra/config/CassandraCqlClusterFactoryBeanUnitTests.java b/spring-cql/src/test/java/org/springframework/cassandra/config/CassandraCqlClusterFactoryBeanUnitTests.java index 580cedbf5..37998822d 100644 --- a/spring-cql/src/test/java/org/springframework/cassandra/config/CassandraCqlClusterFactoryBeanUnitTests.java +++ b/spring-cql/src/test/java/org/springframework/cassandra/config/CassandraCqlClusterFactoryBeanUnitTests.java @@ -85,22 +85,6 @@ public class CassandraCqlClusterFactoryBeanUnitTests { assertThat(bean.getObject().isClosed(), is(true)); } - /** - * @see DATACASS-226 - * @throws Exception - */ - @Test - public void shouldSetCompressionType() throws Exception { - - CompressionType compressionType = CompressionType.SNAPPY; - - CassandraCqlClusterFactoryBean bean = new CassandraCqlClusterFactoryBean(); - bean.setCompressionType(compressionType); - bean.afterPropertiesSet(); - - assertThat(getConfiguration(bean).getProtocolOptions().getCompression(), is(Compression.SNAPPY)); - } - /** * @see DATACASS-217 * @throws Exception @@ -114,7 +98,23 @@ public class CassandraCqlClusterFactoryBeanUnitTests { bean.setCompressionType(compressionType); bean.afterPropertiesSet(); - assertThat(getConfiguration(bean).getProtocolOptions().getCompression(), is(Compression.LZ4)); + assertThat(getProtocolOptions(bean).getCompression(), is(Compression.LZ4)); + } + + /** + * @see DATACASS-226 + * @throws Exception + */ + @Test + public void shouldSetSnappyCompressionType() throws Exception { + + CompressionType compressionType = CompressionType.SNAPPY; + + CassandraCqlClusterFactoryBean bean = new CassandraCqlClusterFactoryBean(); + bean.setCompressionType(compressionType); + bean.afterPropertiesSet(); + + assertThat(getProtocolOptions(bean).getCompression(), is(Compression.SNAPPY)); } /**