}
@Test
public void insertAsynchronouslyTest() {
Book b1 = new Book();
b1.setIsbn("123456-1");
b1.setTitle("Spring Data Cassandra Guide");
b1.setAuthor("Cassandra Guru");
b1.setPages(521);
template.insertAsynchronously(b1);
Book b2 = new Book();
b2.setIsbn("123456-2");
b2.setTitle("Spring Data Cassandra Guide");
b2.setAuthor("Cassandra Guru");
b2.setPages(521);
template.insertAsynchronously(b2);
/*
* Test Single Insert with entity
*/
Book b3 = new Book();
b3.setIsbn("123456-3");
b3.setTitle("Spring Data Cassandra Guide");
b3.setAuthor("Cassandra Guru");
b3.setPages(265);
WriteOptions options = new WriteOptions();
options.setTtl(60);
options.setConsistencyLevel(ConsistencyLevel.ONE);
options.setRetryPolicy(RetryPolicy.DOWNGRADING_CONSISTENCY);
template.insertAsynchronously(b3, options);
/*
* Test Single Insert with entity
*/
Book b4 = new Book();
b4.setIsbn("123456-4");
b4.setTitle("Spring Data Cassandra Guide");
b4.setAuthor("Cassandra Guru");
b4.setPages(465);
/*
* Test Single Insert with entity
*/
Book b5 = new Book();
b5.setIsbn("123456-5");
b5.setTitle("Spring Data Cassandra Guide");
b5.setAuthor("Cassandra Guru");
b5.setPages(265);
template.insertAsynchronously(b5, options);
}