@Test public void testInvalidMobileApiPageview() throws MalformedURLException { URL url = new URL("http: URL referer = new URL("http: assertTrue(pageviewFilter.isApiPageview(url, referer)); }
public final boolean isApiPageview(final URL url, final URL referer) { boolean resultMainRequest = isApiPageviewRequest(url); if (referer == null) { return resultMainRequest; } else { boolean resultRefererRequest = isApiPageviewRequest(referer); if (resultRefererRequest) { return refersToDifferentArticle(url, referer); } else { return true; } } }
PageviewFilter { public final boolean isApiPageview(final URL url, final URL referer) { boolean resultMainRequest = isApiPageviewRequest(url); if (referer == null) { return resultMainRequest; } else { boolean resultRefererRequest = isApiPageviewRequest(referer); if (resultRefererRequest) { return refersToDifferentArticle(url, referer); } else { return true; } } } }
PageviewFilter { public final boolean isApiPageview(final URL url, final URL referer) { boolean resultMainRequest = isApiPageviewRequest(url); if (referer == null) { return resultMainRequest; } else { boolean resultRefererRequest = isApiPageviewRequest(referer); if (resultRefererRequest) { return refersToDifferentArticle(url, referer); } else { return true; } } }  }
PageviewFilter { public final boolean isApiPageview(final URL url, final URL referer) { boolean resultMainRequest = isApiPageviewRequest(url); if (referer == null) { return resultMainRequest; } else { boolean resultRefererRequest = isApiPageviewRequest(referer); if (resultRefererRequest) { return refersToDifferentArticle(url, referer); } else { return true; } } }  final boolean isNotBitsOrUploadDomain(final URL url); final boolean isValidUserAgent(final String userAgent); final boolean callPageviewHandler(final URL url, final URL referer); final boolean isValidRegularPageview(final URL url); final boolean isApiPageview(final URL url, final URL referer); final boolean refersToDifferentArticle(final URL url, final URL referer); final boolean isValidMimeType(final URL url, final String mimeType); final boolean isValidResponseCode(final String responseCode); final boolean isValidRequestMethod(final String requestMethod); final boolean isValidBlogPageview(final URL url); }
PageviewFilter { public final boolean isApiPageview(final URL url, final URL referer) { boolean resultMainRequest = isApiPageviewRequest(url); if (referer == null) { return resultMainRequest; } else { boolean resultRefererRequest = isApiPageviewRequest(referer); if (resultRefererRequest) { return refersToDifferentArticle(url, referer); } else { return true; } } }  final boolean isNotBitsOrUploadDomain(final URL url); final boolean isValidUserAgent(final String userAgent); final boolean callPageviewHandler(final URL url, final URL referer); final boolean isValidRegularPageview(final URL url); final boolean isApiPageview(final URL url, final URL referer); final boolean refersToDifferentArticle(final URL url, final URL referer); final boolean isValidMimeType(final URL url, final String mimeType); final boolean isValidResponseCode(final String responseCode); final boolean isValidRequestMethod(final String requestMethod); final boolean isValidBlogPageview(final URL url);  }