### Question:
SchemaProducerImpl implements SchemaProducer { @Override public String lastSchema() { StringBuilder schema = new StringBuilder(); for (Version version : versionsAvailable()) { for (Class<? extends CassandraDao> clazz : tablesOfDao.getDAOs()) { schema.append(loadDaoScripts(tablesOfDao.getTables(clazz), version)); } } return schema.toString(); } @Inject @VisibleForTesting  SchemaProducerImpl(DaoTables tablesOfDao); @Override SortedSet<Version> versionsAvailable(); @Override String lastSchema(); @Override String schema(Version version); @Override String lastSchemaForDAO(Class<? extends CassandraDao> clazz); @Override String schemaForDAO(Class<? extends CassandraDao> clazz, final Version version); @Override String schema(Version fromVersion, Version toVersion);  }### Answer:
@Test public void testLastSchema() { String schema = schemaProducerImpl.lastSchema(); assertThat(schema).isEqualTo( "CREATE TABLE monitored_collection (\n" + " credentials text,\n" + " device text,\n" + " analysed_sync_collections set<text>,\n" + " PRIMARY KEY (credentials, device)\n" + ");\n" + "CREATE TABLE snapshot_index (\n" + " device_id text,\n" + " collection_id int,\n" + " sync_key uuid,\n" + " snapshot_id uuid,\n" + " PRIMARY KEY ((device_id), collection_id, sync_key)\n" + ");\n" + "CREATE TABLE snapshot (\n" + " id uuid,\n" + " snapshot text,\n" + " PRIMARY KEY (id)\n" + ");\n" + "CREATE TABLE synced_collection (\n" + " credentials text,\n" + " device text,\n" + " collection_id int,\n" + " analysed_sync_collection text,\n" + " PRIMARY KEY (credentials, device, collection_id)\n" + ");\n" + "CREATE TABLE windowing_index (\n" + " user text,\n" + " device_id text,\n" + " collection_id int,\n" + " sync_key uuid,\n" + " windowing_id uuid,\n" + " windowing_kind text,\n" + " windowing_index int,\n" + " PRIMARY KEY (user, device_id, collection_id, sync_key)\n" + ");\n" + "CREATE TABLE windowing (\n" + " id uuid,\n" + " change_index int,\n" + " change_type text,\n" + " change_value text,\n" + " PRIMARY KEY ((id), change_index, change_type)\n" + ");\n" + "CREATE TABLE schema_version (\n" + " id int,\n" + " version int,\n" + " date timestamp,\n" + " PRIMARY KEY ((id), version)\n" + ") with clustering order by (version desc);\n" + "ALTER TABLE monitored_collection VERSION 2\n" + "ALTER TABLE snapshot VERSION 2\n" + "ALTER TABLE snapshot VERSION 3\n" + "ALTER TABLE windowing_index VERSION 3\n"); }