void closeAllStreams() {
    // Supplier<Stream>.get() starts the stream which is an expensive operation as it initiates the
    // streaming RPCs by possibly making calls over the network. Do not close the streams unless
    // they have already been started.
    if (started.get()) {
      getWorkStream.get().shutdown();
      getDataStream.get().shutdown();
      workCommitter.get().stop();
      commitWorkStream.get().shutdown();
    }
  }
@Test
  public void testCloseAllStreams_doesNotCloseUnstartedStreams() {
    WindmillStreamSender windmillStreamSender =
        newWindmillStreamSender(GetWorkBudget.builder().setBytes(1L).setItems(1L).build());

    windmillStreamSender.closeAllStreams();

    verifyNoInteractions(streamFactory);
  }