@Test
public void test3_PaySuccessful(){
init();
ViewInteraction amountEditText = onView(
allOf(withId(R.id.et_amount), isDispl
True, you shouldn't add test code in production code. The problem here lies in the animation. If you are performing animations using Handlers and Runnables then you can't turn them off using the Developer Options. A common place where we use this to animate is in Custom views.
But even in custom views, ensure you use either ValueAnimator, ObjectAnimator or AnimatorSet to perform your animation. Only then you can turn off animations by turning off Animator duration scale in Developer options.
A good reference is the ProgressBar.