### Question:
SchemaProducerImpl implements SchemaProducer { @Override public SortedSet<Version> versionsAvailable(){ Builder<Version> builder = ImmutableSortedSet.<Version> naturalOrder(); for (File versionDirectory : versionDirectories()) { builder.add(Version.of(Integer.valueOf(versionDirectory.getName()))); } return builder.build(); } @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 testVersionsAvailableWhenBadVersionsFolder() { SchemaProducerImpl schemaProducerImpl = new BadVersionsFolderSchemaProducerImpl(); SortedSet<Version> versionsAvailable = schemaProducerImpl.versionsAvailable(); assertThat(versionsAvailable).isEmpty(); }
@Test public void testVersionsAvailable() { SortedSet<Version> versionsAvailable = schemaProducerImpl.versionsAvailable(); assertThat(versionsAvailable).containsExactly(Version.of(1), Version.of(2), Version.of(3)); }