// Path: nimble/src/main/java/com/lenguyenthanh/nimble/NimblePresenter.java
// public interface NimblePresenter<View extends NimbleView> {
//   void takeView(View view);
// 
//   void onSave(Bundle outState);
// 
//   void dropView(View view);
// 
//   void onCreate(Bundle savedInstanceState);
// 
//   void onDestroy();
// }
// 
// Path: nimble/src/main/java/com/lenguyenthanh/nimble/NimbleView.java
// public interface NimbleView {
// }


import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.when;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import com.lenguyenthanh.nimble.NimblePresenter;
import com.lenguyenthanh.nimble.NimbleView;
import junit.framework.Assert;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
    Bundle bundle = mock(Bundle.class);
    layout.onRestoreInstanceState(bundle);
    verify(bundle).getParcelable(TestLayout.PARENT_STATE_KEY);
    verify(presenter).onCreate(bundle);
  }

  @Test
  public void testGetActivity() throws Exception {
    Activity activity = layout.getActivity();
    Assert.assertNotNull(activity);
  }

  public static class TestLayout extends NimbleRelativeLayout<NimbleView> {

    NimblePresenter<NimbleView> presenter;

    @Override
    public Activity getActivity() {
      return mock(Activity.class);
    }

    public void setPresenter(NimblePresenter<NimbleView> presenter) {
      this.presenter = presenter;
    }

    public TestLayout(Context context) {
      super(context);
    }

    @Override
// Path: nimble/src/main/java/com/lenguyenthanh/nimble/NimblePresenter.java
// public interface NimblePresenter<View extends NimbleView> {
//   void takeView(View view);
// 
//   void onSave(Bundle outState);
// 
//   void dropView(View view);
// 
//   void onCreate(Bundle savedInstanceState);
// 
//   void onDestroy();
// }
// 
// Path: nimble/src/main/java/com/lenguyenthanh/nimble/NimbleView.java
// public interface NimbleView {
// }


// Path: nimble/src/test/java/com/lenguyenthanh/nimble/view/TestNimbleRelativeLayout.java
import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.when;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import com.lenguyenthanh.nimble.NimblePresenter;
import com.lenguyenthanh.nimble.NimbleView;
import junit.framework.Assert;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;

    Bundle bundle = mock(Bundle.class);
    layout.onRestoreInstanceState(bundle);
    verify(bundle).getParcelable(TestLayout.PARENT_STATE_KEY);
    verify(presenter).onCreate(bundle);
  }

  @Test
  public void testGetActivity() throws Exception {
    Activity activity = layout.getActivity();
    Assert.assertNotNull(activity);
  }

  public static class TestLayout extends NimbleRelativeLayout<NimbleView> {

    NimblePresenter<NimbleView> presenter;

    @Override
    public Activity getActivity() {
      return mock(Activity.class);
    }

    public void setPresenter(NimblePresenter<NimbleView> presenter) {
      this.presenter = presenter;
    }

    public TestLayout(Context context) {
      super(context);
    }

    @Override
    protected NimblePresenter<NimbleView> presenter() {