### Question:
RepositorySessionTimeoutHandler implements InvocationHandler { boolean connectedToRepository() { return repository.isConnected(); } RepositorySessionTimeoutHandler( ReconnectableRepository repository,
      RepositoryConnectController repositoryConnectController ); @SuppressWarnings( "unchecked" ) @Override Object invoke( Object proxy, Method method, Object[] args );  }### Answer:
@Test public void connectedToRepository() { when( repository.isConnected() ).thenReturn( true ); assertTrue( timeoutHandler.connectedToRepository() ); }
@Test public void connectedToRepositoryReturnsFalse() { when( repository.isConnected() ).thenReturn( false ); assertFalse( timeoutHandler.connectedToRepository() ); }