@Test
public void should_migrate_a_widget(){

    Migration<Widget> migrations = new Migration("1.2.0", mock(MigrationStep.class));
    WidgetMigrationApplyer widgetMigrationApplyer = new WidgetMigrationApplyer(Collections.singletonList(migrations));
    Widget widget = WidgetBuilder.aWidget().id("customWidget").version("1.0.1").previousDesignerVersion("1.0.1").build();
    widgetMigrationApplyer.migrate(widget);
    Assert.assertEquals(widget.getPreviousDesignerVersion(),"1.0.1");
    Assert.assertEquals(widget.getDesignerVersion(),"1.2.0");
    Assert.assertEquals(widget.getDesignerVersion(),"1.2.0");
}