### Question:
SchemaProducerImpl implements SchemaProducer { private List<Version> versionsToApply(Version toVersion) { return versionsToApply(null, toVersion); } @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=IllegalArgumentException.class) public void testVersionsToApplyToVersionMandatory() { schemaProducerImpl.versionsToApply(null, null); }
@Test public void testVersionsToApplyWithoutFromVersionBringsThemAll() { List<Version> versions = schemaProducerImpl.versionsToApply(null, Version.of(3)); assertThat(versions).containsExactly(Version.of(1), Version.of(2), Version.of(3)); }
@Test public void testVersionsToApply() { List<Version> versions = schemaProducerImpl.versionsToApply(Version.of(2), Version.of(3)); assertThat(versions).containsExactly(Version.of(3)); }