@Test public void listUnrunChangeSets() throws LiquibaseException { when(changeSet1.getId()).thenReturn("id1"); when(changeSet1.getAuthor()).thenReturn("author1"); Set<String> contextSet = new HashSet<String>(); contextSet.add(EXPANSION); when(changeSet1.getContexts()).thenReturn(contextSet); when(liquibase.listUnrunChangeSets(StringUtils.EMPTY)).thenReturn(Arrays.<ChangeSet>asList(changeSet1)); List<UnRunChangeSetInfo> unRunChangeSetInfo = databaseUpgradeSupport.listUnRunChangeSets(); verify(liquibase).listUnrunChangeSets(StringUtils.EMPTY); UnRunChangeSetInfo unRunChangeSetInfo1 = unRunChangeSetInfo.get(0); assertThat(unRunChangeSetInfo1.getId(), is("id1")); assertThat(unRunChangeSetInfo1.getAuthor(), is("author1")); assertThat(unRunChangeSetInfo1.getContexts(), is("["+EXPANSION+"]")); }
public List<UnRunChangeSetInfo> listUnRunChangeSets() { try { return CollectionUtils.collect(liquibase.listUnrunChangeSets(EMPTY), new Transformer<ChangeSet, UnRunChangeSetInfo>() { @Override public UnRunChangeSetInfo transform(ChangeSet changeSet) { return new UnRunChangeSetInfo(changeSet); } }); } catch (LiquibaseException e) { throw new MifosRuntimeException(e); } }
DatabaseUpgradeSupport { public List<UnRunChangeSetInfo> listUnRunChangeSets() { try { return CollectionUtils.collect(liquibase.listUnrunChangeSets(EMPTY), new Transformer<ChangeSet, UnRunChangeSetInfo>() { @Override public UnRunChangeSetInfo transform(ChangeSet changeSet) { return new UnRunChangeSetInfo(changeSet); } }); } catch (LiquibaseException e) { throw new MifosRuntimeException(e); } } }
DatabaseUpgradeSupport { public List<UnRunChangeSetInfo> listUnRunChangeSets() { try { return CollectionUtils.collect(liquibase.listUnrunChangeSets(EMPTY), new Transformer<ChangeSet, UnRunChangeSetInfo>() { @Override public UnRunChangeSetInfo transform(ChangeSet changeSet) { return new UnRunChangeSetInfo(changeSet); } }); } catch (LiquibaseException e) { throw new MifosRuntimeException(e); } } DatabaseUpgradeSupport(DataSource dataSource, ResourceOpener resourceOpener);  DatabaseUpgradeSupport(Database database, Liquibase liquibase); }
DatabaseUpgradeSupport { public List<UnRunChangeSetInfo> listUnRunChangeSets() { try { return CollectionUtils.collect(liquibase.listUnrunChangeSets(EMPTY), new Transformer<ChangeSet, UnRunChangeSetInfo>() { @Override public UnRunChangeSetInfo transform(ChangeSet changeSet) { return new UnRunChangeSetInfo(changeSet); } }); } catch (LiquibaseException e) { throw new MifosRuntimeException(e); } } DatabaseUpgradeSupport(DataSource dataSource, ResourceOpener resourceOpener);  DatabaseUpgradeSupport(Database database, Liquibase liquibase); DbUpgradeValidationResult validate(); void expansion(); void contraction(); List<ChangeSetInfo> listRanUpgrades(); List<UnRunChangeSetInfo> listUnRunChangeSets(); }
DatabaseUpgradeSupport { public List<UnRunChangeSetInfo> listUnRunChangeSets() { try { return CollectionUtils.collect(liquibase.listUnrunChangeSets(EMPTY), new Transformer<ChangeSet, UnRunChangeSetInfo>() { @Override public UnRunChangeSetInfo transform(ChangeSet changeSet) { return new UnRunChangeSetInfo(changeSet); } }); } catch (LiquibaseException e) { throw new MifosRuntimeException(e); } } DatabaseUpgradeSupport(DataSource dataSource, ResourceOpener resourceOpener);  DatabaseUpgradeSupport(Database database, Liquibase liquibase); DbUpgradeValidationResult validate(); void expansion(); void contraction(); List<ChangeSetInfo> listRanUpgrades(); List<UnRunChangeSetInfo> listUnRunChangeSets(); static final String EXPANSION; static final String CONTRACTION; static final String BEAN_NAME; }