public Future<Void> migrateFromDeploymentToStrimziPodSets(Deployment deployment, StrimziPodSet podSet)    {
        if (deployment == null) {
            // Deployment does not exist anymore => no migration needed
            return Future.succeededFuture();
        } else {
            int depReplicas = deployment.getSpec().getReplicas();
            int podSetReplicas = podSet != null ? podSet.getSpec().getPods().size() : 0;

            return moveOnePodFromDeploymentToStrimziPodSet(depReplicas - 1, Math.min(podSetReplicas + 1, connect.getReplicas()));
        }
    }
@Test
    public void testMigrationToPodSetsWithRecreateStrategy(VertxTestContext context)  {
        DeploymentOperator mockDepOps = mock(DeploymentOperator.class);
        StrimziPodSetOperator mockPodSetOps = mock(StrimziPodSetOperator.class);
        PodOperator mockPodOps = mock(PodOperator.class);
        LinkedList<String> events = mockKubernetes(mockDepOps, mockPodSetOps, mockPodOps);

        KafkaConnect connect = new KafkaConnectBuilder(CONNECT)
                .editSpec()
                    .withNewTemplate()
                        .withNewDeployment()
                            .withDeploymentStrategy(DeploymentStrategy.RECREATE)
                        .endDeployment()
                    .endTemplate()
                .endSpec()
                .build();
        KafkaConnectCluster cluster = KafkaConnectCluster.fromCrd(RECONCILIATION, connect, VERSIONS, SHARED_ENV_PROVIDER);

        KafkaConnectMigration migration = new KafkaConnectMigration(
                RECONCILIATION,
                cluster,
                null,
                null,
                1_000L,
                false,
                null,
                null,
                null,
                mockDepOps,
                mockPodSetOps,
                mockPodOps
        );

        Checkpoint async = context.checkpoint();
        migration.migrateFromDeploymentToStrimziPodSets(
                DEPLOYMENT,
                null
        ).onComplete(context.succeeding(v -> context.verify(() -> {
            assertThat(events.size(), is(11));

            assertThat(events.poll(), is("DEP-SCALE-DOWN-TO-2"));
            assertThat(events.poll(), is("DEP-READINESS-" + COMPONENT_NAME));
            assertThat(events.poll(), is("POD-SET-RECONCILE-TO-1"));
            assertThat(events.poll(), is("POD-READINESS-my-connect-connect-0"));
            assertThat(events.poll(), is("DEP-SCALE-DOWN-TO-1"));
            assertThat(events.poll(), is("DEP-READINESS-" + COMPONENT_NAME));
            assertThat(events.poll(), is("POD-SET-RECONCILE-TO-2"));
            assertThat(events.poll(), is("POD-READINESS-my-connect-connect-1"));
            assertThat(events.poll(), is("DEP-DELETE-" + COMPONENT_NAME));
            assertThat(events.poll(), is("POD-SET-RECONCILE-TO-3"));
            assertThat(events.poll(), is("POD-READINESS-my-connect-connect-2"));

            async.flag();
        })));
    }