ConnectedClient { public Session newSession() { if (!stillConnected()) { throw new IllegalStateException("Cannot start session on a disconnected client. Use stillConnected() to check connection"); } warmup(); return SimpleChromeCustomTabsSession.newSessionFor(customTabsClient); } ConnectedClient(@NonNull CustomTabsClient customTabsClient); Session newSession(); boolean stillConnected(); void disconnect();  }
@Test public void givenThatClientIsConnected_whenStartingNewSession_thenNewSessionIsStarted() { connectedClient.newSession(); verify(mockCustomTabsClient).newSession(null); }