### Question:
KafkaMessageHandlerRegistry implements IKafkaMessageHandlerRegistry<T> { @Override public List<IKafkaMessageHandler<T>> getForTopicOrFail(String topic) { List<IKafkaMessageHandler<T>> topicKafkaMessageHandlers = getForTopic(topic); if (topicKafkaMessageHandlers.isEmpty()) { throw new IllegalStateException("No handler found for topic '" + topic + "'."); } return topicKafkaMessageHandlers; }  @PostConstruct @SuppressWarnings("checkstyle:MultipleStringLiterals") void init(); @Override List<IKafkaMessageHandler<T>> getForTopic(String topic); @Override List<IKafkaMessageHandler<T>> getForTopicOrFail(String topic); @Override boolean isEmpty(); @Override List<IKafkaMessageHandler<T>> getKafkaMessageHandlers();  }### Answer:
@Test void throwsIllegalStateExceptionForNonExistingTopic() { assertThrows(IllegalStateException.class, () -> kafkaMessageHandlerRegistry.getForTopicOrFail("UNKNOWN")); }