From 12efd5755126ffb9485370c684ac86cd9acb336b Mon Sep 17 00:00:00 2001 From: Madmat8 Date: Thu, 9 Nov 2023 08:40:36 +0100 Subject: [PATCH] update versions --- .../entity/CompositionRelationshipsTest.java | 49 ++++++------- ...ppedTransferCompositonAggregationTest.java | 69 +++++++++---------- pom.xml | 6 +- 3 files changed, 62 insertions(+), 62 deletions(-) diff --git a/judo-runtime-core-jsl-itest/models/EntityRelationshipsModel/src/test/java/hu/blackbelt/judo/runtime/core/jsl/entity/CompositionRelationshipsTest.java b/judo-runtime-core-jsl-itest/models/EntityRelationshipsModel/src/test/java/hu/blackbelt/judo/runtime/core/jsl/entity/CompositionRelationshipsTest.java index a4ca8bca..c0a6e768 100644 --- a/judo-runtime-core-jsl-itest/models/EntityRelationshipsModel/src/test/java/hu/blackbelt/judo/runtime/core/jsl/entity/CompositionRelationshipsTest.java +++ b/judo-runtime-core-jsl-itest/models/EntityRelationshipsModel/src/test/java/hu/blackbelt/judo/runtime/core/jsl/entity/CompositionRelationshipsTest.java @@ -59,6 +59,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; +import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Optional; @@ -569,8 +570,8 @@ void testAddAndRemoveOnCollections() { assertEquals("C1", entityA1.getSingleRequiredConA().getStringC().orElseThrow()); assertEquals(2, entityA1.getCollectionConA().size()); - assertEquals("C2", entityA1.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C2")).findFirst().orElseThrow().getStringC().orElseThrow()); - assertEquals("C3", entityA1.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C3")).findFirst().orElseThrow().getStringC().orElseThrow()); + assertEquals(1, entityA1.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C2")).count()); + assertEquals(1, entityA1.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C3")).count()); EntityC c4 = EntityC.builder().withStringC("C4").build(); EntityC c5 = EntityC.builder().withStringC("C5").build(); @@ -580,19 +581,19 @@ void testAddAndRemoveOnCollections() { assertEquals("C1", entityA1.getSingleRequiredConA().getStringC().orElseThrow()); assertEquals(5, entityA1.getCollectionConA().size()); - assertEquals("C2", entityA1.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C2")).findFirst().orElseThrow().getStringC().orElseThrow()); - assertEquals("C3", entityA1.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C3")).findFirst().orElseThrow().getStringC().orElseThrow()); - assertEquals("C4", entityA1.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C4")).findFirst().orElseThrow().getStringC().orElseThrow()); - assertEquals("C5", entityA1.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C5")).findFirst().orElseThrow().getStringC().orElseThrow()); - assertEquals("C6", entityA1.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C6")).findFirst().orElseThrow().getStringC().orElseThrow()); + assertEquals(1, entityA1.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C2")).count()); + assertEquals(1, entityA1.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C3")).count()); + assertEquals(1, entityA1.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C4")).count()); + assertEquals(1, entityA1.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C5")).count()); + assertEquals(1, entityA1.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C6")).count()); entityA1.addToCollectionConA(null); assertEquals(6, entityA1.getCollectionConA().size()); EntityC c7 = EntityC.builder().withStringC("C7").build(); entityA1.addToCollectionConA(null, c7); - assertEquals("C6", entityA1.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C6")).findFirst().orElseThrow().getStringC().orElseThrow()); - assertEquals("C7", entityA1.getCollectionConA().stream() - .filter(c -> c != null && c.getStringC().orElseThrow().equals("C7")).findFirst().orElseThrow().getStringC().orElseThrow()); + assertEquals(1, entityA1.getCollectionConA().stream().filter(c -> c != null && c.getStringC().orElseThrow().equals("C6")).count()); + assertEquals(1, entityA1.getCollectionConA().stream() + .filter(c -> c != null && c.getStringC().orElseThrow().equals("C7")).count()); assertEquals(8, entityA1.getCollectionConA().size()); // The ID of c3 was changed after entity A1 was created @@ -633,12 +634,12 @@ void testAddAndRemoveOnCollections() { assertEquals("A2", entityA2.getStringA().orElseThrow()); assertEquals("A3", entityA3.getStringA().orElseThrow()); assertEquals("A4", entityA4.getStringA().orElseThrow()); - assertEquals("C3", entityA3.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C3")).findFirst().orElseThrow().getStringC().orElseThrow()); - assertEquals("C4", entityA3.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C4")).findFirst().orElseThrow().getStringC().orElseThrow()); - assertEquals("C7", entityA4.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C7")).findFirst().orElseThrow().getStringC().orElseThrow()); - assertEquals("C8", entityA4.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C8")).findFirst().orElseThrow().getStringC().orElseThrow()); - assertEquals("C9", entityA2.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C9")).findFirst().orElseThrow().getStringC().orElseThrow()); - assertEquals("C10", entityA2.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C10")).findFirst().orElseThrow().getStringC().orElseThrow()); + assertEquals(1, entityA3.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C3")).count()); + assertEquals(1, entityA3.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C4")).count()); + assertEquals(1, entityA4.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C7")).count()); + assertEquals(1, entityA4.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C8")).count()); + assertEquals(1, entityA2.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C9")).count()); + assertEquals(1, entityA2.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C10")).count()); entityA3.removeFromCollectionConA(c3); composition.getEntityA().orElseThrow().removeFromCollectionConA(c9); @@ -656,10 +657,10 @@ void testAddAndRemoveOnCollections() { assertEquals("A2", entityA2.getStringA().orElseThrow()); assertEquals("A3", entityA3.getStringA().orElseThrow()); assertEquals("A4", entityA4.getStringA().orElseThrow()); - assertEquals("C4", entityA3.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C4")).findFirst().orElseThrow().getStringC().orElseThrow()); - assertEquals("C7", entityA4.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C7")).findFirst().orElseThrow().getStringC().orElseThrow()); - assertEquals("C8", entityA4.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C8")).findFirst().orElseThrow().getStringC().orElseThrow()); - assertEquals("C10", entityA2.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C10")).findFirst().orElseThrow().getStringC().orElseThrow()); + assertEquals(1, entityA3.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C4")).count()); + assertEquals(1, entityA4.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C7")).count()); + assertEquals(1, entityA4.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C8")).count()); + assertEquals(1, entityA2.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C10")).count()); EntityA entityA5 = EntityA.builder().withStringA("AA").withSingleRequiredConA(EntityC.builder().withStringC("CC").build()).build(); entityA5.addToCollectionConA(EntityC.builder().withStringC("C12").build()); @@ -682,11 +683,11 @@ void testAddAndRemoveOnCollections() { assertEquals("A4", entityA4.getStringA().orElseThrow()); assertEquals("A4", entityA4.getStringA().orElseThrow()); assertEquals("AA", entityA5.getStringA().orElseThrow()); - assertEquals("C4", entityA3.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C4")).findFirst().orElseThrow().getStringC().orElseThrow()); - assertEquals("C8", entityA4.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C8")).findFirst().orElseThrow().getStringC().orElseThrow()); - assertEquals("C10", entityA2.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C10")).findFirst().orElseThrow().getStringC().orElseThrow()); + assertEquals(1, entityA3.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C4")).count()); + assertEquals(1, entityA4.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C8")).count()); + assertEquals(1, entityA2.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C10")).count()); assertEquals("CC", entityA5.getSingleRequiredConA().getStringC().orElseThrow()); - assertEquals("C12", entityA5.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C12")).findFirst().orElseThrow().getStringC().orElseThrow()); + assertEquals(1, entityA5.getCollectionConA().stream().filter(c -> c.getStringC().orElseThrow().equals("C12")).count()); EntityA entityA = entityADao.create(EntityA.builder().withSingleRequiredConA(EntityC.builder().build()).build()); diff --git a/judo-runtime-core-jsl-itest/models/TransferAggregationModel/src/test/java/hu/blackbelt/judo/runtime/core/jsl/transfer/MappedTransferCompositonAggregationTest.java b/judo-runtime-core-jsl-itest/models/TransferAggregationModel/src/test/java/hu/blackbelt/judo/runtime/core/jsl/transfer/MappedTransferCompositonAggregationTest.java index 6b331149..bce55207 100644 --- a/judo-runtime-core-jsl-itest/models/TransferAggregationModel/src/test/java/hu/blackbelt/judo/runtime/core/jsl/transfer/MappedTransferCompositonAggregationTest.java +++ b/judo-runtime-core-jsl-itest/models/TransferAggregationModel/src/test/java/hu/blackbelt/judo/runtime/core/jsl/transfer/MappedTransferCompositonAggregationTest.java @@ -504,8 +504,8 @@ void testAddAndRemoveOnCollections() { assertEquals("B1", transferA1.getSingleEntityB().orElseThrow().getNameB().orElseThrow()); assertEquals(2, transferA1.getMultiEntityB().size()); - assertEquals("B2", transferA1.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B2")).findFirst().orElseThrow().getNameB().orElseThrow()); - assertEquals("B3", transferA1.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B3")).findFirst().orElseThrow().getNameB().orElseThrow()); + assertEquals(1, transferA1.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B2")).count()); + assertEquals(1, transferA1.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B3")).count()); TransferB b4 = TransferB.builder().withNameB("B4").build(); TransferB b5 = TransferB.builder().withNameB("B5").build(); @@ -515,19 +515,19 @@ void testAddAndRemoveOnCollections() { assertEquals("B1", transferA1.getSingleEntityB().orElseThrow().getNameB().orElseThrow()); assertEquals(5, transferA1.getMultiEntityB().size()); - assertEquals("B2", transferA1.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B2")).findFirst().orElseThrow().getNameB().orElseThrow()); - assertEquals("B3", transferA1.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B3")).findFirst().orElseThrow().getNameB().orElseThrow()); - assertEquals("B4", transferA1.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B4")).findFirst().orElseThrow().getNameB().orElseThrow()); - assertEquals("B5", transferA1.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B5")).findFirst().orElseThrow().getNameB().orElseThrow()); - assertEquals("B6", transferA1.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B6")).findFirst().orElseThrow().getNameB().orElseThrow()); + assertEquals(1, transferA1.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B2")).count()); + assertEquals(1, transferA1.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B3")).count()); + assertEquals(1, transferA1.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B4")).count()); + assertEquals(1, transferA1.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B5")).count()); + assertEquals(1, transferA1.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B6")).count()); transferA1.addToMultiEntityB(null); assertEquals(6, transferA1.getMultiEntityB().size()); TransferB b7 = TransferB.builder().withNameB("B7").build(); transferA1.addToMultiEntityB(null, b7); - assertEquals("B6", transferA1.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B6")).findFirst().orElseThrow().getNameB().orElseThrow()); - assertEquals("B7", transferA1.getMultiEntityB().stream() - .filter(c -> c != null && c.getNameB().orElseThrow().equals("B7")).findFirst().orElseThrow().getNameB().orElseThrow()); + assertEquals(1, transferA1.getMultiEntityB().stream().filter(c -> c != null && c.getNameB().orElseThrow().equals("B6")).count()); + assertEquals(1, transferA1.getMultiEntityB().stream() + .filter(c -> c != null && c.getNameB().orElseThrow().equals("B7")).count()); assertEquals(8, transferA1.getMultiEntityB().size()); // The ID of b3 was changed after entity A1 was created @@ -568,13 +568,12 @@ void testAddAndRemoveOnCollections() { assertEquals("A2", transferA2.getStringA().orElseThrow()); assertEquals("A3", transferA3.getStringA().orElseThrow()); assertEquals("A4", transferA4.getStringA().orElseThrow()); - assertEquals("B3", transferA3.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B3")).findFirst().orElseThrow().getNameB().orElseThrow()); - assertEquals("B4", transferA3.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B4")).findFirst().orElseThrow().getNameB().orElseThrow()); - assertEquals("B7", transferA4.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B7")).findFirst().orElseThrow().getNameB().orElseThrow()); - assertEquals("B8", transferA4.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B8")).findFirst().orElseThrow().getNameB().orElseThrow()); - assertEquals("B9", transferA2.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B9")).findFirst().orElseThrow().getNameB().orElseThrow()); - assertEquals("B10", transferA2.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B10")).findFirst().orElseThrow().getNameB().orElseThrow()); - + assertEquals(1, transferA3.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B3")).count()); + assertEquals(1, transferA3.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B4")).count()); + assertEquals(1, transferA4.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B7")).count()); + assertEquals(1, transferA4.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B8")).count()); + assertEquals(1, transferA2.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B9")).count()); + assertEquals(1, transferA2.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B10")).count()); transferA3.removeFromMultiEntityB(b3); composition.getTransferA().orElseThrow().removeFromMultiEntityB(b9); @@ -589,10 +588,10 @@ void testAddAndRemoveOnCollections() { assertEquals("A2", transferA2.getStringA().orElseThrow()); assertEquals("A3", transferA3.getStringA().orElseThrow()); assertEquals("A4", transferA4.getStringA().orElseThrow()); - assertEquals("B4", transferA3.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B4")).findFirst().orElseThrow().getNameB().orElseThrow()); - assertEquals("B7", transferA4.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B7")).findFirst().orElseThrow().getNameB().orElseThrow()); - assertEquals("B8", transferA4.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B8")).findFirst().orElseThrow().getNameB().orElseThrow()); - assertEquals("B10", transferA2.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B10")).findFirst().orElseThrow().getNameB().orElseThrow()); + assertEquals(1, transferA3.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B4")).count()); + assertEquals(1, transferA4.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B7")).count()); + assertEquals(1, transferA4.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B8")).count()); + assertEquals(1, transferA2.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B10")).count()); Composition compositionEntity = compositionDao.getById(composition.adaptTo(CompositionIdentifier.class)).orElseThrow(); @@ -602,10 +601,10 @@ void testAddAndRemoveOnCollections() { assertEquals("A2", entityA2.getStringA().orElseThrow()); assertEquals("A3", entityA3.getStringA().orElseThrow()); assertEquals("A4", entityA4.getStringA().orElseThrow()); - assertEquals("B4", entityA3.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B4")).findFirst().orElseThrow().getNameB().orElseThrow()); - assertEquals("B7", entityA4.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B7")).findFirst().orElseThrow().getNameB().orElseThrow()); - assertEquals("B8", entityA4.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B8")).findFirst().orElseThrow().getNameB().orElseThrow()); - assertEquals("B10", entityA2.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B10")).findFirst().orElseThrow().getNameB().orElseThrow()); + assertEquals(1, entityA3.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B4")).count()); + assertEquals(1, entityA4.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B7")).count()); + assertEquals(1, entityA4.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B8")).count()); + assertEquals(1, entityA2.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B10")).count()); TransferA transferA5 = TransferA.builder().withStringA("AA").withSingleEntityB(TransferB.builder().withNameB("BB").build()).build(); transferA5.addToMultiEntityB(TransferB.builder().withNameB("B12").build()); @@ -628,11 +627,11 @@ void testAddAndRemoveOnCollections() { assertEquals("A4", transferA4.getStringA().orElseThrow()); assertEquals("A4", transferA4.getStringA().orElseThrow()); assertEquals("AA", transferA5.getStringA().orElseThrow()); - assertEquals("B4", transferA3.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B4")).findFirst().orElseThrow().getNameB().orElseThrow()); - assertEquals("B8", transferA4.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B8")).findFirst().orElseThrow().getNameB().orElseThrow()); - assertEquals("B10", transferA2.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B10")).findFirst().orElseThrow().getNameB().orElseThrow()); - assertEquals("BB", transferA5.getSingleEntityB().orElseThrow().getNameB().orElseThrow()); - assertEquals("B12", transferA5.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B12")).findFirst().orElseThrow().getNameB().orElseThrow()); + assertEquals(1, transferA3.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B4")).count()); + assertEquals(1, transferA4.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B8")).count()); + assertEquals(1, transferA2.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B10")).count()); + assertEquals(1, transferA5.getSingleEntityB().orElseThrow().getNameB().orElseThrow()); + assertEquals(1, transferA5.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B12")).count()); compositionEntity = compositionDao.getById(composition.adaptTo(CompositionIdentifier.class)).orElseThrow(); @@ -644,11 +643,11 @@ void testAddAndRemoveOnCollections() { assertEquals("A3", entityA3.getStringA().orElseThrow()); assertEquals("A4", entityA4.getStringA().orElseThrow()); assertEquals("AA", entityA5.getStringA().orElseThrow()); - assertEquals("B4", entityA3.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B4")).findFirst().orElseThrow().getNameB().orElseThrow()); - assertEquals("B8", entityA4.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B8")).findFirst().orElseThrow().getNameB().orElseThrow()); - assertEquals("B10", entityA2.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B10")).findFirst().orElseThrow().getNameB().orElseThrow()); - assertEquals("BB", transferA5.getSingleEntityB().orElseThrow().getNameB().orElseThrow()); - assertEquals("B12", transferA5.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B12")).findFirst().orElseThrow().getNameB().orElseThrow()); + assertEquals(1, entityA3.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B4")).count()); + assertEquals(1, entityA4.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B8")).count()); + assertEquals(1, entityA2.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B10")).count()); + assertEquals(1, transferA5.getSingleEntityB().orElseThrow().getNameB().orElseThrow()); + assertEquals(1, transferA5.getMultiEntityB().stream().filter(c -> c.getNameB().orElseThrow().equals("B12")).count()); } } diff --git a/pom.xml b/pom.xml index da23d65b..61431d01 100644 --- a/pom.xml +++ b/pom.xml @@ -40,9 +40,9 @@ javax.resource;version="[1.6,2)" - 1.1.4.20231102_104307_2f6a20d7_feature_JNG_4220_support_add_and_remove_for_collections - 1.0.6.20231102_103603_195f545f_feature_JNG_4220_support_add_and_remove_for_collections - 1.0.0.20231102_102801_5cbb2727_feature_JNG_4220_support_add_and_remove_for_collections + 1.1.4.20231108_140557_34ee8a2b_feature_JNG_4220_support_add_and_remove_for_collections + 1.0.6.20231108_135629_2bf286eb_feature_JNG_4220_support_add_and_remove_for_collections + 1.0.0.20231108_135216_df34c488_feature_JNG_4220_support_add_and_remove_for_collections 1.3.0.20231010_040556_b7a6fa07_develop