public async Task TestInsertTelemetryAndUpdateRobotsAsync_UpsertTelemetry_ExpectedExecutions(int numItems)
        {
            mockCosmosClientTelemetry.Setup(x =>
                                            x.UpsertItemAsync(It.IsAny <RobotTelemetry>(), It.IsAny <PartitionKey>())).Throws(new Exception("invalid"));

            FleetManager fleetManager = new FleetManager(mockIotClient.Object, mockCosmosClientRobot.Object, telemetryHandler, mockLogger.Object);

            IEnumerable <RobotTelemetry> testTelemetry = GetTestTelemetry(numItems);

            // should not throw exception
            await fleetManager.InsertTelemetriesAndUpdateRobotsAsync(testTelemetry);

            mockCosmosClientTelemetry.Verify(x => x.UpsertItemAsync(It.IsAny <RobotTelemetry>(), It.IsAny <PartitionKey>()), Times.Exactly(numItems));
        }