diff --git a/sink/src/test/kotlin/org/neo4j/connectors/kafka/sink/converters/Neo4jValueConverterNestedStructTest.kt b/sink/src/test/kotlin/org/neo4j/connectors/kafka/sink/converters/Neo4jValueConverterNestedStructTest.kt index 877dc3e9..23d12872 100644 --- a/sink/src/test/kotlin/org/neo4j/connectors/kafka/sink/converters/Neo4jValueConverterNestedStructTest.kt +++ b/sink/src/test/kotlin/org/neo4j/connectors/kafka/sink/converters/Neo4jValueConverterNestedStructTest.kt @@ -25,7 +25,6 @@ import org.apache.kafka.connect.data.SchemaBuilder import org.apache.kafka.connect.data.Struct import org.junit.jupiter.api.Test import org.neo4j.connectors.kafka.utils.JSONUtils -import org.neo4j.driver.Values @Suppress("UNCHECKED_CAST") class Neo4jValueConverterNestedStructTest { @@ -125,9 +124,7 @@ class Neo4jValueConverterNestedStructTest { } fun getExpectedMap(): Map { - return JSONUtils.readValue>(data).mapValues(::convertDateNew).mapValues { - Values.value(it.value) - } + return JSONUtils.readValue>(data).mapValues(::convertDateNew) } fun convertDate(it: Map.Entry): Any? = diff --git a/sink/src/test/kotlin/org/neo4j/connectors/kafka/sink/converters/Neo4jValueConverterTest.kt b/sink/src/test/kotlin/org/neo4j/connectors/kafka/sink/converters/Neo4jValueConverterTest.kt index 042267a2..d9676511 100644 --- a/sink/src/test/kotlin/org/neo4j/connectors/kafka/sink/converters/Neo4jValueConverterTest.kt +++ b/sink/src/test/kotlin/org/neo4j/connectors/kafka/sink/converters/Neo4jValueConverterTest.kt @@ -33,8 +33,6 @@ import org.apache.kafka.connect.data.Struct import org.apache.kafka.connect.data.Time import org.apache.kafka.connect.data.Timestamp import org.junit.jupiter.api.Test -import org.neo4j.driver.Value -import org.neo4j.driver.Values class Neo4jValueConverterTest { @@ -458,33 +456,24 @@ class Neo4jValueConverterTest { return Struct(BODY_SCHEMA).put("ul", ulList).put("p", pList) } - fun getExpectedMap(): Map { + fun getExpectedMap(): Map { val firstULMap = mapOf( "value" to listOf( + mapOf("value" to "First UL - First Element", "class" to null), mapOf( - "value" to Values.value("First UL - First Element"), - "class" to Values.NULL), - mapOf( - "value" to Values.value("First UL - Second Element"), - "class" to Values.value(listOf("ClassA", "ClassB"))))) + "value" to "First UL - Second Element", + "class" to listOf("ClassA", "ClassB")))) val secondULMap = mapOf( "value" to listOf( - mapOf( - "value" to Values.value("Second UL - First Element"), - "class" to Values.NULL), - mapOf( - "value" to Values.value("Second UL - Second Element"), - "class" to Values.NULL))) - val ulListMap = Values.value(listOf(firstULMap, secondULMap)) + mapOf("value" to "Second UL - First Element", "class" to null), + mapOf("value" to "Second UL - Second Element", "class" to null))) + val ulListMap = listOf(firstULMap, secondULMap) val pListMap = - Values.value( - listOf( - mapOf("value" to Values.value("First Paragraph")), - mapOf("value" to Values.value("Second Paragraph")))) + listOf(mapOf("value" to "First Paragraph"), mapOf("value" to "Second Paragraph")) return mapOf("ul" to ulListMap, "p" to pListMap) }