// 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 android.os.Bundle;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import com.lenguyenthanh.nimble.NimblePresenter;
import com.lenguyenthanh.nimble.NimbleView;
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;
    verify(presenter).takeView(fragment);
  }

  @Test
  public void testOnPause() throws Exception {
    fragment.onPause();
    verify(presenter).dropView(fragment);
  }

  @Test
  public void testOnSaveInstanceState() throws Exception {
    fragment.onSaveInstanceState(bundle);
    verify(presenter).onSave(bundle);
  }

  @Test
  public void testOnDestroy() throws Exception {
    fragment.onDestroy();
    verify(presenter).onDestroy();
  }

  public static class TestFragment extends NimbleFragment<NimbleView> {

    NimblePresenter<NimbleView> presenter;

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

    @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/NimbleFragmentTest.java
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import com.lenguyenthanh.nimble.NimblePresenter;
import com.lenguyenthanh.nimble.NimbleView;
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;

    verify(presenter).takeView(fragment);
  }

  @Test
  public void testOnPause() throws Exception {
    fragment.onPause();
    verify(presenter).dropView(fragment);
  }

  @Test
  public void testOnSaveInstanceState() throws Exception {
    fragment.onSaveInstanceState(bundle);
    verify(presenter).onSave(bundle);
  }

  @Test
  public void testOnDestroy() throws Exception {
    fragment.onDestroy();
    verify(presenter).onDestroy();
  }

  public static class TestFragment extends NimbleFragment<NimbleView> {

    NimblePresenter<NimbleView> presenter;

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

    @Override
    protected NimblePresenter<NimbleView> presenter() {