assertThatExceptionOfType(IllegalStateException.class)
.isThrownBy(() -> endlessConsumer.exitStatus())
.describedAs("Consumer should still be running");
+
+ recordGenerator.assertBusinessLogic();
}
@Test
assertThat(endlessConsumer.exitStatus())
.describedAs("Consumer should have exited abnormally")
.containsInstanceOf(RecordDeserializationException.class);
+
+ recordGenerator.assertBusinessLogic();
}
@Test
assertThat(endlessConsumer.exitStatus())
.describedAs("Consumer should have exited abnormally")
.containsInstanceOf(RuntimeException.class);
+
+ recordGenerator.assertBusinessLogic();
}
{
return true;
}
+
+ default void assertBusinessLogic()
+ {
+ log.debug("No business-logic to assert");
+ }
}
void sendMessage(ProducerRecord<Bytes, Bytes> record)