@Override
    public void close() throws Exception {
        parentService.remove(componentId);
    }
@Test
    void testCloseWithoutStart() throws Exception {
        final CompletableFuture<String> actualComponentId = new CompletableFuture<>();
        final DefaultLeaderElection.ParentService parentService =
                TestingAbstractLeaderElectionService.newBuilder()
                        .setRemoveConsumer(actualComponentId::complete)
                        .build();

        final DefaultLeaderElection testInstance =
                new DefaultLeaderElection(parentService, DEFAULT_TEST_COMPONENT_ID);
        testInstance.close();

        assertThatFuture(actualComponentId)
                .eventuallySucceeds()
                .isEqualTo(DEFAULT_TEST_COMPONENT_ID);
    }