From 3606a17f5fa7afa66c868231d6e6cbbfeaa15151 Mon Sep 17 00:00:00 2001 From: stheppi Date: Fri, 20 Dec 2024 10:27:54 +0000 Subject: [PATCH] fix the unit test --- .../common/formats/reader/EmptyCloudStreamReaderTest.scala | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kafka-connect-cloud-common/src/test/scala/io/lenses/streamreactor/connect/cloud/common/formats/reader/EmptyCloudStreamReaderTest.scala b/kafka-connect-cloud-common/src/test/scala/io/lenses/streamreactor/connect/cloud/common/formats/reader/EmptyCloudStreamReaderTest.scala index 89cdb6ec7..49467566d 100644 --- a/kafka-connect-cloud-common/src/test/scala/io/lenses/streamreactor/connect/cloud/common/formats/reader/EmptyCloudStreamReaderTest.scala +++ b/kafka-connect-cloud-common/src/test/scala/io/lenses/streamreactor/connect/cloud/common/formats/reader/EmptyCloudStreamReaderTest.scala @@ -35,11 +35,9 @@ class EmptyCloudStreamReaderTest extends AnyFunSuiteLike with Matchers { } } - test("EmptyCloudStreamReader should throw UnsupportedOperationException for currentRecordIndex") { + test("EmptyCloudStreamReader should return -1 for currentRecordIndex") { val emptyCloudStreamReader = new EmptyCloudStreamReader(null) - assertThrows[UnsupportedOperationException] { - emptyCloudStreamReader.currentRecordIndex - } + emptyCloudStreamReader.currentRecordIndex shouldBe -1 } test("EmptyCloudStreamReader should return the location provided in the constructor") {