CassandraStateRepository implements StateRepository { public static Builder newBuilder(final Keyspace keyspace) { return new Builder(keyspace); } CassandraStateRepository(final Keyspace keyspace); private  CassandraStateRepository(final Builder builder); @Override FeatureState getFeatureState(Feature feature); @Override void setFeatureState(final FeatureState featureState); static Builder newBuilder(final Keyspace keyspace);  }
@Test public void testAutomaticCreationOfColumnFamily() throws ConnectionException { final String columnFamilyName = "I_dont_exist"; final Keyspace keyspace = new KeyspaceBuilder("Test Cluster", "TogglzTest").setThriftPort(9171).build(); assertNull(keyspace.describeKeyspace().getColumnFamily(columnFamilyName)); CassandraStateRepository.newBuilder(keyspace) .autoCreateColumnFamily(true) .columnFamily(columnFamilyName) .build(); assertNotNull(keyspace.describeKeyspace().getColumnFamily(columnFamilyName)); }