SimpleChromeCustomTabsWebNavigator implements WebNavigator { @Override public void navigateTo(Uri url, Activity activityContext) { if (connection.isConnected()) { buildIntent().launchUrl(activityContext, url); } else if (hasNavigationFallback()) { navigationFallback.onFallbackNavigateTo(url); } } SimpleChromeCustomTabsWebNavigator(Connection connection); @Override WebNavigator withFallback(NavigationFallback navigationFallback); @Override WebNavigator withIntentCustomizer(IntentCustomizer intentCustomizer); @Override void navigateTo(Uri url, Activity activityContext); @Override void release();  }
@Test public void givenThereIsNoConnection_whenNavigatingWithoutFallback_thenNothingHappens() { when(mockConnection.isConnected()).thenReturn(false); webNavigator.navigateTo(ANY_URL, mockActivity); verifyZeroInteractions(mockNavigationFallback); }