public boolean isAuditTopic(KafkaCluster cluster, String topic) {
    var writer = auditWriters.get(cluster.getName());
    return writer != null
        && topic.equals(writer.targetTopic())
        && writer.isTopicWritingEnabled();
  }
@Test
  void isAuditTopicChecksIfAuditIsEnabledForCluster() {
    Map<String, AuditWriter> writers = Map.of(
        "c1", new AuditWriter("с1", true, "c1topic", null, null),
        "c2", new AuditWriter("c2", false, "c2topic", mock(KafkaProducer.class), null)
    );

    var auditService = new AuditService(writers);
    assertThat(auditService.isAuditTopic(KafkaCluster.builder().name("notExist").build(), "some"))
        .isFalse();
    assertThat(auditService.isAuditTopic(KafkaCluster.builder().name("c1").build(), "c1topic"))
        .isFalse();
    assertThat(auditService.isAuditTopic(KafkaCluster.builder().name("c2").build(), "c2topic"))
        .isTrue();
  }