AnalyticsValidator extends AbstractChannelListener { @Override public boolean shouldFilter(@NonNull Log log) { if (log instanceof PageLog) { return !validateLog((LogWithNameAndProperties) log); } else if (log instanceof EventLog) { return !validateLog((EventLog) log); } return false; }  @Override boolean shouldFilter(@NonNull Log log);  }
@Test public void shouldFilterInvalidType() { assertFalse(mAnalyticsValidator.shouldFilter(new LogWithNameAndProperties() { @Override public String getType() { return ""; } })); }