PlayerController { void setUpLoopControl() { videoControlView.setVisibility(View.INVISIBLE); videoView.setOnClickListener(view -> { if (videoView.isPlaying()) { videoView.pause(); } else { videoView.start(); } }); } PlayerController(View rootView, SwipeToDismissTouchListener.Callback callback);   PlayerController(View rootView, VideoView videoView, VideoControlView videoControlView,
            ProgressBar videoProgressView, TextView callToActionView,
            SwipeToDismissTouchListener.Callback callback);   }
@Test public void testSetUpLoopControl() { subject.setUpLoopControl(); verify(videoView).setOnClickListener(clickListenerCaptor.capture()); final View.OnClickListener listener = clickListenerCaptor.getValue(); when(videoView.isPlaying()).thenReturn(false); listener.onClick(null); verify(videoView).start(); when(videoView.isPlaying()).thenReturn(true); listener.onClick(null); verify(videoView).pause(); }