@Test public void constructor_shouldAddCloseButtonWidgetToLayoutAndSetToGoneWithOnTouchListeners() throws Exception { initializeSubject(); VastVideoCloseButtonWidget closeButtonWidget = subject.getCloseButtonWidget(); assertThat(closeButtonWidget.getParent()).isEqualTo(subject.getLayout()); assertThat(closeButtonWidget.getVisibility()).isEqualTo(View.GONE); ShadowRelativeLayout closeButtonWidgetShadow = (ShadowRelativeLayout) shadowOf(closeButtonWidget); assertThat(closeButtonWidgetShadow.getOnTouchListener()).isNull(); ShadowImageView closeButtonImageViewShadow = shadowOf(closeButtonWidget.getImageView()); assertThat(closeButtonImageViewShadow.getOnTouchListener()).isNotNull(); ShadowTextView closeButtonTextViewShadow = shadowOf(closeButtonWidget.getTextView()); assertThat(closeButtonTextViewShadow.getOnTouchListener()).isNotNull(); }