### Question:
Schemas { public Schema getSchema(int version) { return new Schema(version); } private  Schemas(int currentRevision,
      Map<String, ImmutableList<? extends TableDefinitionOperation>> tables,
      ImmutableMap<Integer, ImmutableMap<String, ImmutableList<? extends TableDowngradeOperation>>> downgrades,
      ImmutableMap<Integer, Migration[]> migrations,
      ImmutableList<Release> releases); Schema getSchema(int version); Schema getCurrentSchema(); ImmutableSet<String> getTablesModifiedInRevision(int version); int getCurrentRevisionNumber(); static TableDowngrade dropTable(String tableName); @Deprecated void upgrade(int fromVersion, Context context, SQLiteDatabase database); void upgrade(Context context, SQLiteDatabase database, int fromVersion, int toVersion);  }### Answer:
@Test public void shouldAllowGettingSchemaForPreviousVersion() throws Exception { Schemas db = Schemas.Builder .currentSchema(2900) .build(); assertThat(db.getSchema(1500)).isNotNull(); }
@Test public void shouldNotAllowGettingSchemaForVersionHigherThanCurrentVersion() throws Exception { expectedException.expectCause(is(IllegalStateException.class)); Schemas db = Schemas.Builder .currentSchema(1500) .build(); db.getSchema(2900); }