import org.apache.kafka.common.errors.RecordDeserializationException;
import org.apache.kafka.common.serialization.*;
import org.apache.kafka.common.utils.Bytes;
-import org.assertj.core.api.OptionalAssert;
import org.junit.jupiter.api.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.kafka.KafkaAutoConfiguration;
assertThatNoException()
.describedAs("Consumer should not be running")
.isThrownBy(() -> endlessConsumer.exitStatus());
- ((OptionalAssert<Exception>)assertThat(endlessConsumer.exitStatus()))
- .describedAs("Consumer should have exited abnormally")
- .containsInstanceOf(RecordDeserializationException.class);
+ assertThat(endlessConsumer.exitStatus())
+ .containsInstanceOf(RecordDeserializationException.class)
+ .describedAs("Consumer should have exited abnormally");
}