@Test
public void shouldRetrieveAllRanUpgrades() throws Exception {

    RanChangeSet ranChangeSet1 = new RanChangeSet(changeSet1);
    RanChangeSet ranChangeSet2 = new RanChangeSet(changeSet2);
    when(database.getRanChangeSetList()).thenReturn(Arrays.asList(ranChangeSet1, ranChangeSet2));
    List<ChangeSetInfo> changeSets = databaseUpgradeSupport.listRanUpgrades();
    assertThat(changeSets, is(not(nullValue())));
    assertThat(changeSets.size(), is(2));
    verify(database).getRanChangeSetList();
}