OneCollectorChannelListener extends AbstractChannelListener { public void setLogUrl(@NonNull String logUrl) { mIngestion.setLogUrl(logUrl); } OneCollectorChannelListener(@NonNull Channel channel, @NonNull LogSerializer logSerializer, @NonNull HttpClient httpClient, @NonNull UUID installId); @VisibleForTesting  OneCollectorChannelListener(@NonNull OneCollectorIngestion ingestion, @NonNull Channel channel, @NonNull LogSerializer logSerializer, @NonNull UUID installId); void setLogUrl(@NonNull String logUrl); @Override void onGroupAdded(@NonNull String groupName, Channel.GroupListener groupListener, long batchTimeInterval); @Override void onGroupRemoved(@NonNull String groupName); @Override void onPreparedLog(@NonNull Log log, @NonNull String groupName, int flags); @Override boolean shouldFilter(@NonNull Log log); @Override void onClear(@NonNull String groupName); @Override void onPaused(@NonNull String groupName, String targetToken); @Override void onResumed(@NonNull String groupName, String targetToken); @Override void onGloballyEnabled(boolean isEnabled);  }
@Test public void setLogUrl() { OneCollectorIngestion ingestion = mock(OneCollectorIngestion.class); OneCollectorChannelListener listener = new OneCollectorChannelListener(ingestion, mock(Channel.class), mock(LogSerializer.class), UUID.randomUUID()); String logUrl = "http: listener.setLogUrl(logUrl); verify(ingestion).setLogUrl(logUrl); }