@Override
    public void destroy() {
        if (this.pubSubClient != null) {
            try {
                this.pubSubClient.shutdown();
                this.pubSubClient.awaitTermination(1, TimeUnit.SECONDS);
            } catch (Exception e) {
                log.error("Failed to shutdown PubSub client during destroy()", e);
            }
        }
    }
@Test
    public void givenPubSubClientIsNotNull_whenDestroy_thenShutDownAndAwaitTermination() throws InterruptedException {
        ReflectionTestUtils.setField(node, "pubSubClient", pubSubClientMock);
        node.destroy();
        then(pubSubClientMock).should().shutdown();
        then(pubSubClientMock).should().awaitTermination(1, TimeUnit.SECONDS);
    }