package org.vaadin.spring.mvp.autowired;

import org.springframework.beans.factory.annotation.Autowired;
import org.vaadin.spring.UIScope;
import org.vaadin.spring.annotation.VaadinComponent;
import org.vaadin.spring.events.EventBus;
import org.vaadin.spring.events.annotation.EventBusListenerMethod;
import org.vaadin.spring.mvp.FooView;
import org.vaadin.spring.mvp.Presenter;

@UIScope
@VaadinComponent
public class AutowiredPresenter extends Presenter<FooView> {

    @Autowired
    public AutowiredPresenter(FooView view, EventBus eventBus) {
        super(view, eventBus);
    }

    @EventBusListenerMethod
    public void onNewCaption(String caption) {
        getView().setCaption(caption);
    }
}

@@ -123,23 +123,42 @@
 .spring.
-UIScope
+annotation.VaadinComponent
 ;%0Aimport
@@ -189,33 +189,31 @@
 ation.Vaadin
-Component
+UIScope
 ;%0Aimport org
@@ -391,16 +391,22 @@
 nter;%0A%0A@
+Vaadin
 UIScope%0A

Test Class Update: Change UIScope => VaadinUIScope