@Test
    public void customTabsProvider() {
        installBrowser(BROWSER1);
        installCustomTabsProvider(CUSTOM_TABS_PROVIDER1);
        installCustomTabsProvider(CUSTOM_TABS_PROVIDER2);

        TwaProviderPicker.Action action = TwaProviderPicker.pickProvider(mPackageManager);

        assertEquals(LaunchMode.CUSTOM_TAB, action.launchMode);
        assertEquals(CUSTOM_TABS_PROVIDER1, action.provider);
    }
Tests that a Custom Tabs provider is chosen over non-Custom Tabs browsers.
customtabs/junit/src/android/support/customtabs/trusted/TwaProviderPickerTest.java