* paths to the goal to make sure we choose the shortest one.
*/
@Test
public void testGetMigrationComplex() {
/* More complex example */
Migrations migrations = new Migrations(new MigrationImpl(1, 2), new MigrationImpl(2, 3),
new MigrationImpl(3, 4), new MigrationImpl(4, 6), new MigrationImpl(3, 5),
new MigrationImpl(2, 4), new MigrationImpl(5, 6), new MigrationImpl(7, 9),
new MigrationImpl(7, 8), new MigrationImpl(8, 9), new MigrationImpl(6, 8));
Migration migration = migrations.getMigration(2, 8);
assertEquals(ChainedMigration.class, migration.getClass());
ChainedMigration chainedMigration = (ChainedMigration) migration;
assertEquals(3, chainedMigration.getMigrations().size());
assertEquals(migrations.getMigrations().get(5), chainedMigration.getMigrations().get(0));
assertEquals(migrations.getMigrations().get(3), chainedMigration.getMigrations().get(1));
assertEquals(migrations.getMigrations().get(10), chainedMigration.getMigrations().get(2));
}