public void enqueue(SimplifiedReconciliation reconciliation)    {
        if (!queue.contains(reconciliation)) {
            LOGGER.debug("Enqueueing {} {} in namespace {}", reconciliation.kind, reconciliation.name, reconciliation.namespace);
            if (!queue.offer(reconciliation))    {
                LOGGER.warn("Failed to enqueue an event because the controller queue is full");
            }
        } else {
            metrics.alreadyEnqueuedReconciliationsCounter(reconciliation.namespace).increment(); // Increase the metrics counter
            LOGGER.debug("{} {} in namespace {} is already enqueued => ignoring", reconciliation.kind, reconciliation.name, reconciliation.namespace);
        }
    }
@Test
    public void testEnqueueingEnqueued() {
        MeterRegistry metricsRegistry = new SimpleMeterRegistry();
        MetricsProvider metrics = new MicrometerMetricsProvider(metricsRegistry);
        ControllerQueue q = new ControllerQueue(10, new ControllerMetricsHolder("kind", Labels.EMPTY, metrics));

        SimplifiedReconciliation r1 = new SimplifiedReconciliation("kind", "my-namespace", "my-name", "watch");
        SimplifiedReconciliation r2 = new SimplifiedReconciliation("kind", "my-namespace", "my-name", "timer");
        SimplifiedReconciliation r3 = new SimplifiedReconciliation("kind", "my-namespace", "my-other-name", "watch");

        q.enqueue(r1);
        q.enqueue(r3);
        q.enqueue(r2);

        assertThat(q.queue.size(), is(2));
        assertThat(q.queue.contains(r1), is(true));
        assertThat(q.queue.contains(r3), is(true));

        // Test metric
        assertThat(metricsRegistry.get(ControllerMetricsHolder.METRICS_RECONCILIATIONS_ALREADY_ENQUEUED).tag("kind", "kind").tag("namespace", "my-namespace").counter().count(), is(1.0));
    }