Further fixes to make things work under cassandra
Fix up test case code