InstantAppUrlFinder { public boolean matchesUrl(@NotNull String url) { for (Element activity : myActivities) { Node node = activity.getFirstChild(); while (node != null) { InstantAppIntentFilterWrapper wrapper = new InstantAppIntentFilterWrapper(myResolver, node); if (wrapper.matchesUrl(url)) { return true; } node = node.getNextSibling(); } } return false; } InstantAppUrlFinder(@NotNull Module module); @VisibleForTesting  InstantAppUrlFinder(@NotNull AttributesResolver resolver, @NotNull Collection<Element> activities); @NotNull ImmutableCollection<String> getAllUrls(); @NotNull String getDefaultUrl(); boolean matchesUrl(@NotNull String url);  }
@Test public void testUrlDataMatch() { assertTrue(urlDataFromStrings("http", "example.com", "", "", "").matchesUrl("http: assertTrue(urlDataFromStrings("http", "example.com", "", "", "").matchesUrl("http: assertFalse(urlDataFromStrings("http", "example.com", "/test", "", "").matchesUrl("http: assertTrue(urlDataFromStrings("http", "example.com", "/test", "", "").matchesUrl("http: assertFalse(urlDataFromStrings("http", "example.com", "/test", "/*", "").matchesUrl("http: assertTrue(urlDataFromStrings("http", "example.com", "", "/test", "").matchesUrl("http: assertFalse(urlDataFromStrings("http", "example.com", "", "/test", "").matchesUrl("http: assertTrue(urlDataFromStrings("http", "example.com", "", "/test", "/.*").matchesUrl("http: assertTrue(urlDataFromStrings("http", "example.com", "", "", "/.*").matchesUrl("http: assertTrue(urlDataFromStrings("http", "example.com", "", "", "/.*").matchesUrl("http: assertFalse(urlDataFromStrings("http", "example.com", "", "", "/test/.*").matchesUrl("http: }