### Question:
SchemaProducerImpl implements SchemaProducer { @VisibleForTesting File[] versionDirectories() { if (versionDirectory == null) { throw new NoVersionException(); } try { return new File(versionDirectory.toURI()).listFiles(new FilenameFilter() { @Override public boolean accept(File dir, String name) { try { Integer.valueOf(name); Path path = Paths.get(dir.getAbsolutePath(), name); return path.toFile().isDirectory(); } catch (NumberFormatException e) { return false; } } }); } catch (URISyntaxException e) { Throwables.propagate(e); return null; } } @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(expected=NoVersionException.class) public void testVersionDirectoriesThrowsException() { SchemaProducerImpl schemaProducerImpl = new NoVersionExceptionSchemaProducerImpl(); schemaProducerImpl.versionDirectories(); }
@Test public void testVersionDirectories() { File[] versionDirectories = schemaProducerImpl.versionDirectories(); assertThat(versionDirectories).hasSize(3); }