@Test
public void should_migrate_all_custom_widget_uses_in_page_when_page_migration_is_done(){

    Migration<Page> migration = new Migration("1.0.1", mock(MigrationStep.class));
    PageMigrationApplyer migrationApplyer = new PageMigrationApplyer(Collections.singletonList(migration), widgetService);
    Page page = PageBuilder.aPage().withId("myPage").withVersion("1.0.0").withPreviousDesignerVersion("1.0.0").build();
    Page migratedPage = migrationApplyer.migrate(page);
    verify(widgetService).migrateAllCustomWidgetUsedInPreviewable(migratedPage);
    Assert.assertEquals(migratedPage.getPreviousDesignerVersion(),"1.0.0");
    Assert.assertEquals(migratedPage.getDesignerVersion(),"1.0.1");
}