@Override
        public void onServiceDisconnected(ComponentName name) {
            mSession = null;
        }
TestRule that helps establishing a connection to CustomTabsService.
customtabs/tests/src/android/support/customtabs/testutil/CustomTabConnectionRule.java