// Path: vangogh/src/androidTest/java/com/pspdfkit/labs/vangogh/view/TestActivity.java
// public class TestActivity extends Activity {
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         setContentView(com.pspdfkit.labs.vangogh.test.R.layout.activity_test);
//     }
// 
// }
// 
// Path: vangogh/src/main/java/com/pspdfkit/labs/vangogh/api/AnimationConstants.java
// static final long DURATION_DEFAULT = new ValueAnimator().getDuration();
// 
// Path: vangogh/src/main/java/com/pspdfkit/labs/vangogh/api/AnimationConstants.java
// static final long DURATION_QUICK = (long) (DURATION_DEFAULT * 0.6f);
// 
// Path: vangogh/src/main/java/com/pspdfkit/labs/vangogh/api/AnimationConstants.java
// public static final long DURATION_SLOW = DURATION_DEFAULT * 3;
// 
// Path: vangogh/src/main/java/com/pspdfkit/labs/vangogh/api/FadeAnimations.java
// public static AnimationCompletable fadeIn(@NonNull View view) {
//     return fadeToAlpha(view, ALPHA_VISIBLE);
// }
// 
// Path: vangogh/src/main/java/com/pspdfkit/labs/vangogh/api/FadeAnimations.java
// public static AnimationCompletable fadeInQuickly(@NonNull View view) {
//     return fadeIn(view, DURATION_QUICK);
// }
// 
// Path: vangogh/src/main/java/com/pspdfkit/labs/vangogh/api/FadeAnimations.java
// public static AnimationCompletable fadeInSlowly(@NonNull View view) {
//     return fadeIn(view, DURATION_SLOW);
// }
// 
// Path: vangogh/src/main/java/com/pspdfkit/labs/vangogh/api/FadeAnimations.java
// public static AnimationCompletable fadeOut(@NonNull View view) {
//     return fadeToAlpha(view, ALPHA_INVISIBLE);
// }
// 
// Path: vangogh/src/main/java/com/pspdfkit/labs/vangogh/api/FadeAnimations.java
// public static AnimationCompletable fadeOutQuickly(@NonNull View view) {
//     return fadeOut(view, DURATION_QUICK);
// }
// 
// Path: vangogh/src/main/java/com/pspdfkit/labs/vangogh/api/FadeAnimations.java
// public static AnimationCompletable fadeOutSlowly(@NonNull View view) {
//     return fadeOut(view, DURATION_SLOW);
// }
// 
// Path: vangogh/src/main/java/com/pspdfkit/labs/vangogh/api/FadeAnimations.java
// public static AnimationCompletable fadeToAlpha(@NonNull View view, float targetAlpha) {
//     return fadeToAlpha(view, targetAlpha, DURATION_DEFAULT, INTERPOLATOR);
// }


import com.pspdfkit.labs.vangogh.view.TestActivity;
import androidx.test.core.app.ActivityScenario;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static com.pspdfkit.labs.vangogh.api.AnimationConstants.DURATION_DEFAULT;
import static com.pspdfkit.labs.vangogh.api.AnimationConstants.DURATION_QUICK;
import static com.pspdfkit.labs.vangogh.api.AnimationConstants.DURATION_SLOW;
import static com.pspdfkit.labs.vangogh.api.FadeAnimations.fadeIn;
import static com.pspdfkit.labs.vangogh.api.FadeAnimations.fadeInQuickly;
import static com.pspdfkit.labs.vangogh.api.FadeAnimations.fadeInSlowly;
import static com.pspdfkit.labs.vangogh.api.FadeAnimations.fadeOut;
import static com.pspdfkit.labs.vangogh.api.FadeAnimations.fadeOutQuickly;
import static com.pspdfkit.labs.vangogh.api.FadeAnimations.fadeOutSlowly;
import static com.pspdfkit.labs.vangogh.api.FadeAnimations.fadeToAlpha;
import static org.junit.Assert.assertEquals;
    @Test
    public void testFadeInWithInterpolator() {
        // TODO Find a way to test interpolator.
    }

    @Test
    public void testFadeInWithDurationAndInterpolator() {
        // TODO Find a way to test interpolator.
    }

    @Test
    public void testFadeInQuickly() throws Throwable {
        activityScenarioRule.getScenario().onActivity(new ActivityScenario.ActivityAction<TestActivity>() {
            @Override
            public void perform(TestActivity activity) {
                view.setAlpha(0f);
            }
        });
        fadeInQuickly(view).subscribe(o);
        assertTestObserverCompletedAfterDuration(DURATION_QUICK);
        assertEquals(1f, view.getAlpha(), 0f);
    }

    @Test
    public void testFadeInQuicklyWithInterpolator() {
        // TODO Find a way to test interpolator.
    }

    @Test
    public void testFadeInSlowly() throws Throwable {
// Path: vangogh/src/androidTest/java/com/pspdfkit/labs/vangogh/view/TestActivity.java
// public class TestActivity extends Activity {
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         setContentView(com.pspdfkit.labs.vangogh.test.R.layout.activity_test);
//     }
// 
// }
// 
// Path: vangogh/src/main/java/com/pspdfkit/labs/vangogh/api/AnimationConstants.java
// static final long DURATION_DEFAULT = new ValueAnimator().getDuration();
// 
// Path: vangogh/src/main/java/com/pspdfkit/labs/vangogh/api/AnimationConstants.java
// static final long DURATION_QUICK = (long) (DURATION_DEFAULT * 0.6f);
// 
// Path: vangogh/src/main/java/com/pspdfkit/labs/vangogh/api/AnimationConstants.java
// public static final long DURATION_SLOW = DURATION_DEFAULT * 3;
// 
// Path: vangogh/src/main/java/com/pspdfkit/labs/vangogh/api/FadeAnimations.java
// public static AnimationCompletable fadeIn(@NonNull View view) {
//     return fadeToAlpha(view, ALPHA_VISIBLE);
// }
// 
// Path: vangogh/src/main/java/com/pspdfkit/labs/vangogh/api/FadeAnimations.java
// public static AnimationCompletable fadeInQuickly(@NonNull View view) {
//     return fadeIn(view, DURATION_QUICK);
// }
// 
// Path: vangogh/src/main/java/com/pspdfkit/labs/vangogh/api/FadeAnimations.java
// public static AnimationCompletable fadeInSlowly(@NonNull View view) {
//     return fadeIn(view, DURATION_SLOW);
// }
// 
// Path: vangogh/src/main/java/com/pspdfkit/labs/vangogh/api/FadeAnimations.java
// public static AnimationCompletable fadeOut(@NonNull View view) {
//     return fadeToAlpha(view, ALPHA_INVISIBLE);
// }
// 
// Path: vangogh/src/main/java/com/pspdfkit/labs/vangogh/api/FadeAnimations.java
// public static AnimationCompletable fadeOutQuickly(@NonNull View view) {
//     return fadeOut(view, DURATION_QUICK);
// }
// 
// Path: vangogh/src/main/java/com/pspdfkit/labs/vangogh/api/FadeAnimations.java
// public static AnimationCompletable fadeOutSlowly(@NonNull View view) {
//     return fadeOut(view, DURATION_SLOW);
// }
// 
// Path: vangogh/src/main/java/com/pspdfkit/labs/vangogh/api/FadeAnimations.java
// public static AnimationCompletable fadeToAlpha(@NonNull View view, float targetAlpha) {
//     return fadeToAlpha(view, targetAlpha, DURATION_DEFAULT, INTERPOLATOR);
// }


// Path: vangogh/src/androidTest/java/com/pspdfkit/labs/vangogh/api/FadeAnimationsTest.java
import com.pspdfkit.labs.vangogh.view.TestActivity;
import androidx.test.core.app.ActivityScenario;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static com.pspdfkit.labs.vangogh.api.AnimationConstants.DURATION_DEFAULT;
import static com.pspdfkit.labs.vangogh.api.AnimationConstants.DURATION_QUICK;
import static com.pspdfkit.labs.vangogh.api.AnimationConstants.DURATION_SLOW;
import static com.pspdfkit.labs.vangogh.api.FadeAnimations.fadeIn;
import static com.pspdfkit.labs.vangogh.api.FadeAnimations.fadeInQuickly;
import static com.pspdfkit.labs.vangogh.api.FadeAnimations.fadeInSlowly;
import static com.pspdfkit.labs.vangogh.api.FadeAnimations.fadeOut;
import static com.pspdfkit.labs.vangogh.api.FadeAnimations.fadeOutQuickly;
import static com.pspdfkit.labs.vangogh.api.FadeAnimations.fadeOutSlowly;
import static com.pspdfkit.labs.vangogh.api.FadeAnimations.fadeToAlpha;
import static org.junit.Assert.assertEquals;

    @Test
    public void testFadeInWithInterpolator() {
        // TODO Find a way to test interpolator.
    }

    @Test
    public void testFadeInWithDurationAndInterpolator() {
        // TODO Find a way to test interpolator.
    }

    @Test
    public void testFadeInQuickly() throws Throwable {
        activityScenarioRule.getScenario().onActivity(new ActivityScenario.ActivityAction<TestActivity>() {
            @Override
            public void perform(TestActivity activity) {
                view.setAlpha(0f);
            }
        });
        fadeInQuickly(view).subscribe(o);
        assertTestObserverCompletedAfterDuration(DURATION_QUICK);
        assertEquals(1f, view.getAlpha(), 0f);
    }

    @Test
    public void testFadeInQuicklyWithInterpolator() {
        // TODO Find a way to test interpolator.
    }

    @Test
    public void testFadeInSlowly() throws Throwable {
        activityScenarioRule.getScenario().onActivity(new ActivityScenario.ActivityAction<TestActivity>() {