Code review comment: Not sure why this is required but if you intended to close out the consumer that was created from previous tests, you can instead use this:  ``` @After public void cleanUp() {     this.consumer.close();     this.consumer = null; } ```

Code under review:
public void receiveUntilTimeoutMultipleTimes() throws IOException {
        this.consumer.close();
        this.consumer = null;

        
        final int numberOfEvents = 15;
        final int numberOfEvents2 = 3;
        final String partitionId = "1";
        final List<EventData> events = getEventsAsList(numberOfEvents, TestUtils.MESSAGE_TRACKING_ID);
        final List<EventData> events2 = getEventsAsList(numberOfEvents2, TestUtils.MESSAGE_TRACKING_ID);

        final EventHubConsumer consumer = client.createConsumer(DEFAULT_CONSUMER_GROUP_NAME, partitionId,
            EventPosition.fromEnqueuedTime(Instant.now()));
        final EventHubProducer producer = client.createProducer(new EventHubProducerOptions().setPartitionId(partitionId));

        try {
            producer.send(events);

            
            final IterableStream<EventData> receive = consumer.receive(100, Duration.ofSeconds(3));

            System.out.println("Sending second batch.");
            producer.send(events2);
            System.out.println("Receiving second batch.");
            final IterableStream<EventData> receive2 = consumer.receive(100, Duration.ofSeconds(5));

            
            final List<EventData> asList = receive.stream().collect(Collectors.toList());
            Assert.assertEquals(numberOfEvents, asList.size());

            final List<EventData> asList2 = receive2.stream().collect(Collectors.toList());
            Assert.assertEquals(numberOfEvents2, asList2.size());
        } finally {
            dispose(consumer, producer);
        }
    }

Line commented on: this.consumer.close();

Revised code:
public void receiveUntilTimeoutMultipleTimes() {
        
        final int numberOfEvents = 15;
        final int numberOfEvents2 = 3;
        final String partitionId = "1";
        final List<EventData> events = getEventsAsList(numberOfEvents);
        final List<EventData> events2 = getEventsAsList(numberOfEvents2);

        final EventHubConsumer consumer = client.createConsumer(DEFAULT_CONSUMER_GROUP_NAME, partitionId,
            EventPosition.fromEnqueuedTime(Instant.now()));
        final EventHubProducer producer = client.createProducer(new EventHubProducerOptions().setPartitionId(partitionId));

        try {
            producer.send(events);

            
            final IterableStream<EventData> receive = consumer.receive(100, Duration.ofSeconds(3));

            logger.info("Sending second batch.");
            producer.send(events2);

            logger.info("Receiving second batch.");
            final IterableStream<EventData> receive2 = consumer.receive(100, Duration.ofSeconds(5));

            
            final List<EventData> asList = receive.stream().collect(Collectors.toList());
            Assert.assertEquals(numberOfEvents, asList.size());

            final List<EventData> asList2 = receive2.stream().collect(Collectors.toList());
            Assert.assertEquals(numberOfEvents2, asList2.size());
        } finally {
            dispose(consumer, producer);
        }
    }