diff --git a/neo4j-ogm-tests/neo4j-ogm-integration-tests/src/test/java/org/neo4j/ogm/persistence/model/ArraysMappingTest.java b/neo4j-ogm-tests/neo4j-ogm-integration-tests/src/test/java/org/neo4j/ogm/persistence/model/ArraysMappingTest.java index 81fc8ed9c..1be450a33 100644 --- a/neo4j-ogm-tests/neo4j-ogm-integration-tests/src/test/java/org/neo4j/ogm/persistence/model/ArraysMappingTest.java +++ b/neo4j-ogm-tests/neo4j-ogm-integration-tests/src/test/java/org/neo4j/ogm/persistence/model/ArraysMappingTest.java @@ -145,7 +145,6 @@ void shouldSerializeNativeByteArrays() { byte[] primitive = {1, 2, 3, 4, 5}; Byte[] wrapped = {9, 8, 7, 6, 5}; - byte[] helloWorld = {104, 101, 108, 108, 111, 64, 119, 111, 114, 108, 100}; EntityWithNativeByteArrays entityWithNativeByteArrays = new EntityWithNativeByteArrays(); entityWithNativeByteArrays.setPrimitive(primitive); @@ -163,7 +162,8 @@ void shouldSerializeNativeByteArrays() { String someTuple = new String(getBytes(result.get("someTuple")), StandardCharsets.UTF_8); assertThat(primitiveArray).isEqualTo(primitive); - assertThat(wrappedArray).isEqualTo(wrapped); + assertThat(wrappedArray).containsExactly(wrapped); + assertThat(someTuple).isEqualTo("hello@world"); } diff --git a/neo4j-ogm-tests/neo4j-ogm-integration-tests/src/test/java/org/neo4j/ogm/persistence/model/EntityGraphMapperTest.java b/neo4j-ogm-tests/neo4j-ogm-integration-tests/src/test/java/org/neo4j/ogm/persistence/model/EntityGraphMapperTest.java index 95fe8f187..2d2217c78 100644 --- a/neo4j-ogm-tests/neo4j-ogm-integration-tests/src/test/java/org/neo4j/ogm/persistence/model/EntityGraphMapperTest.java +++ b/neo4j-ogm-tests/neo4j-ogm-integration-tests/src/test/java/org/neo4j/ogm/persistence/model/EntityGraphMapperTest.java @@ -866,7 +866,7 @@ void shouldNotMessUpNestedLists() { assertThat(nestedLists).isInstanceOf(Long[][].class); Long[][] columns = (Long[][]) nestedLists; - assertThat(columns).hasSize(4); + assertThat(columns.length).isEqualTo(4); assertThat(columns[0]).isInstanceOf(Long[].class) .satisfies(c -> assertThat(((Long[]) c)).containsExactly(0L, 1L, 2L)); assertThat(columns[1]).isInstanceOf(Long[].class) @@ -938,7 +938,8 @@ void shouldNotMessUpMixedTypedLists() { assertThat(row.get("n")) .isInstanceOf(Teacher.class) - .extracting("name").first().isEqualTo("Jim"); + .extracting("name") + .isEqualTo("Jim"); }); } diff --git a/neo4j-ogm-tests/neo4j-ogm-integration-tests/src/test/java/org/neo4j/ogm/persistence/model/RelationshipMappingTest.java b/neo4j-ogm-tests/neo4j-ogm-integration-tests/src/test/java/org/neo4j/ogm/persistence/model/RelationshipMappingTest.java index 43abbb219..83997a058 100644 --- a/neo4j-ogm-tests/neo4j-ogm-integration-tests/src/test/java/org/neo4j/ogm/persistence/model/RelationshipMappingTest.java +++ b/neo4j-ogm-tests/neo4j-ogm-integration-tests/src/test/java/org/neo4j/ogm/persistence/model/RelationshipMappingTest.java @@ -586,7 +586,7 @@ void patternComprehensionShouldBeMappedToCorrectRelationships() { // GH-666 @Test void shouldNotMessUpNodes() { - assertMapping(MessedUpNode1.class, node -> node.getRef(), false); + assertMapping(MessedUpNode1.class, MessedUpNode1::getRef, false); } // GH-666 @@ -637,9 +637,9 @@ private static void assertCorrectRelationShip(Iterable> resu assertThat(result).allSatisfy(row -> { assertThat(row).containsKeys("n1"); if (expectedNode != null) { - assertThat(row.get("n1")).extracting("ref").extracting("id").containsExactly(expectedNode.getId()); + assertThat(row.get("n1")).extracting("ref").extracting("id").isEqualTo(expectedNode.getId()); } else { - assertThat(row.get("n1")).extracting("ref").hasSize(1).containsOnlyNulls(); + assertThat(row.get("n1")).extracting("ref").isNull(); } }); } diff --git a/neo4j-ogm-tests/neo4j-ogm-integration-tests/src/test/kotlin/org/neo4j/ogm/kotlin/KotlinInteropTest.kt b/neo4j-ogm-tests/neo4j-ogm-integration-tests/src/test/kotlin/org/neo4j/ogm/kotlin/KotlinInteropTest.kt index f6b9b5f08..161ea07c8 100644 --- a/neo4j-ogm-tests/neo4j-ogm-integration-tests/src/test/kotlin/org/neo4j/ogm/kotlin/KotlinInteropTest.kt +++ b/neo4j-ogm-tests/neo4j-ogm-integration-tests/src/test/kotlin/org/neo4j/ogm/kotlin/KotlinInteropTest.kt @@ -252,7 +252,8 @@ class KotlinInteropTest { val nameFilter = Filter("userId", ComparisonOperator.EQUALS, userId).ignoreCase() val loadedUsers = sessionFactory.openSession().loadAll(User::class.java, nameFilter); - assertThat(loadedUsers).hasSize(1).extracting(User::userId).containsOnly(userId) + assertThat(loadedUsers).hasSize(1); + assertThat(loadedUsers).first().extracting(User::userId).isEqualTo(userId) val loadedUser = sessionFactory.openSession().queryForObject("MATCH (u:User) RETURN u", mapOf(Pair("userId", userId)))!! assertThat(loadedUser).isNotNull().extracting {user -> user.userId}.isEqualTo(userId) diff --git a/pom.xml b/pom.xml index d9cf4bf1d..704fe34fa 100644 --- a/pom.xml +++ b/pom.xml @@ -187,7 +187,7 @@ 17 - 3.11.1 + 3.24.2 3.1.8 10.12.4 1.11 @@ -226,6 +226,7 @@ true ${java.version} 1.2.2 + 1.14.8 @@ -332,6 +333,13 @@ reactive-streams ${reactive-streams.version} + + + + net.bytebuddy + byte-buddy + ${byte-buddy.version} +