With certain tests, you'll only need to check the first emission or a finite number of items coming from the flow. You can consume the first emission to the flow by calling first(). This function waits until the first item is received and then sends the cancellation signal to the producer.