Visibility { public static boolean isScreenVisible(final int visibility) { return visibility == View.VISIBLE; } private  Visibility(); static boolean isScreenVisible(final int visibility); static boolean hasScreenVisibilityChanged(final int oldVisibility,
            final int newVisibility);  }
@Test public void isScreenVisible_shouldOnlyReturnTrueForViewVisible() throws Exception { assertThat(Visibility.isScreenVisible(View.VISIBLE)).isTrue(); assertThat(Visibility.isScreenVisible(View.INVISIBLE)).isFalse(); assertThat(Visibility.isScreenVisible(View.GONE)).isFalse(); }