### Question:
SnapshotCollectingCallback implements DiscoveryServerCallbacks { @Override public void onStreamClose(long streamId, String typeUrl) { onStreamCloseHelper(streamId); } SnapshotCollectingCallback(SnapshotCache<T, X> snapshotCache,
      NodeGroup<T> nodeGroup, Clock clock, Set<Consumer<T>> collectorCallbacks,
      long collectAfterMillis, long collectionIntervalMillis); @Override synchronized void onV2StreamRequest(long streamId, DiscoveryRequest request); @Override synchronized void onV3StreamRequest(long streamId,
      io.envoyproxy.envoy.service.discovery.v3.DiscoveryRequest request); @Override void onStreamClose(long streamId, String typeUrl); @Override void onStreamCloseWithError(long streamId, String typeUrl, Throwable error);  }### Answer:
@Test public void testCloseBeforeRequest() { callback.onStreamClose(0, ""); assertThat(collectedGroups).isEmpty(); }