diff --git a/testdata-generator-common/src/main/java/io/openepcis/testdata/generator/model/ObjectEventCreationModel.java b/testdata-generator-common/src/main/java/io/openepcis/testdata/generator/model/ObjectEventCreationModel.java index ed37ba4..928d15e 100644 --- a/testdata-generator-common/src/main/java/io/openepcis/testdata/generator/model/ObjectEventCreationModel.java +++ b/testdata-generator-common/src/main/java/io/openepcis/testdata/generator/model/ObjectEventCreationModel.java @@ -114,7 +114,7 @@ private void configureCommons(final ObjectEvent e) { return Stream.empty(); }) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (r1, r2) -> r1)); - e.setIlmdXml(ilmdMap); + e.setIlmdXml(ilmdMap.isEmpty() ? null : ilmdMap); } } diff --git a/testdata-generator-common/src/main/java/io/openepcis/testdata/generator/model/TransformationEventCreationModel.java b/testdata-generator-common/src/main/java/io/openepcis/testdata/generator/model/TransformationEventCreationModel.java index 09907ed..1807bd0 100644 --- a/testdata-generator-common/src/main/java/io/openepcis/testdata/generator/model/TransformationEventCreationModel.java +++ b/testdata-generator-common/src/main/java/io/openepcis/testdata/generator/model/TransformationEventCreationModel.java @@ -94,7 +94,7 @@ private void configureCommons(final TransformationEvent e) { return Stream.empty(); }) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); - e.setIlmdXml(ilmdMap); + e.setIlmdXml(ilmdMap.isEmpty() ? null : ilmdMap); } }