@Override
    public void confirmLeadership(UUID leaderSessionID, String leaderAddress) {
        parentService.confirmLeadership(componentId, leaderSessionID, leaderAddress);
    }
@Test
    void testLeaderConfirmation() throws Exception {
        final AtomicReference<String> componentIdRef = new AtomicReference<>();
        final AtomicReference<UUID> leaderSessionIDRef = new AtomicReference<>();
        final AtomicReference<String> leaderAddressRef = new AtomicReference<>();
        final DefaultLeaderElection.ParentService parentService =
                TestingAbstractLeaderElectionService.newBuilder()
                        .setConfirmLeadershipConsumer(
                                (componentId, leaderSessionID, address) -> {
                                    componentIdRef.set(componentId);
                                    leaderSessionIDRef.set(leaderSessionID);
                                    leaderAddressRef.set(address);
                                })
                        .build();
        try (final DefaultLeaderElection testInstance =
                new DefaultLeaderElection(parentService, DEFAULT_TEST_COMPONENT_ID)) {

            final UUID expectedLeaderSessionID = UUID.randomUUID();
            final String expectedAddress = "random-address";
            testInstance.confirmLeadership(expectedLeaderSessionID, expectedAddress);

            assertThat(componentIdRef).hasValue(DEFAULT_TEST_COMPONENT_ID);
            assertThat(leaderSessionIDRef).hasValue(expectedLeaderSessionID);
            assertThat(leaderAddressRef).hasValue(expectedAddress);
        }
    }