diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/query/Update.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/query/Update.java
index 00e35280b8..8438e201b9 100644
--- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/query/Update.java
+++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/query/Update.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2010-2015 the original author or authors.
+ * Copyright 2010-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,6 +20,7 @@
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
+import java.util.Date;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
@@ -35,13 +36,14 @@
/**
* Class to easily construct MongoDB update clauses.
- *
+ *
* @author Thomas Risberg
* @author Mark Pollack
* @author Oliver Gierke
* @author Becca Gaspard
* @author Christoph Strobl
* @author Thomas Darimont
+ * @author Alexey Plotnik
*/
public class Update {
@@ -55,7 +57,7 @@ public enum Position {
/**
* Static factory method to create an Update using the provided key
- *
+ *
* @param key
* @return
*/
@@ -69,7 +71,7 @@ public static Update update(String key, Object value) {
* {@literal $set}. This means fields not given in the {@link DBObject} will be nulled when executing the update. To
* create an only-updating {@link Update} instance of a {@link DBObject}, call {@link #set(String, Object)} for each
* value in it.
- *
+ *
* @param object the source {@link DBObject} to create the update from.
* @param exclude the fields to exclude.
* @return
@@ -99,7 +101,7 @@ public static Update fromDBObject(DBObject object, String... exclude) {
/**
* Update using the {@literal $set} update modifier
- *
+ *
* @see http://docs.mongodb.org/manual/reference/operator/update/set/
* @param key
* @param value
@@ -112,7 +114,7 @@ public Update set(String key, Object value) {
/**
* Update using the {@literal $setOnInsert} update modifier
- *
+ *
* @see http://docs.mongodb.org/manual/reference/operator/update/setOnInsert/
* @param key
* @param value
@@ -125,7 +127,7 @@ public Update setOnInsert(String key, Object value) {
/**
* Update using the {@literal $unset} update modifier
- *
+ *
* @see http://docs.mongodb.org/manual/reference/operator/update/unset/
* @param key
* @return
@@ -137,7 +139,7 @@ public Update unset(String key) {
/**
* Update using the {@literal $inc} update modifier
- *
+ *
* @see http://docs.mongodb.org/manual/reference/operator/update/inc/
* @param key
* @param inc
@@ -150,7 +152,7 @@ public Update inc(String key, Number inc) {
/**
* Update using the {@literal $push} update modifier
- *
+ *
* @see http://docs.mongodb.org/manual/reference/operator/update/push/
* @param key
* @param value
@@ -165,7 +167,7 @@ public Update push(String key, Object value) {
* Update using {@code $push} modifier.
* Allows creation of {@code $push} command for single or multiple (using {@code $each}) values as well as using
* {@code $position}.
- *
+ *
* @see http://docs.mongodb.org/manual/reference/operator/update/push/
* @see http://docs.mongodb.org/manual/reference/operator/update/each/
* @param key
@@ -183,7 +185,7 @@ public PushOperatorBuilder push(String key) {
* Update using the {@code $pushAll} update modifier.
* Note: In mongodb 2.4 the usage of {@code $pushAll} has been deprecated in favor of {@code $push $each}.
* {@link #push(String)}) returns a builder that can be used to populate the {@code $each} object.
- *
+ *
* @see http://docs.mongodb.org/manual/reference/operator/update/pushAll/
* @param key
* @param values
@@ -197,7 +199,7 @@ public Update pushAll(String key, Object[] values) {
/**
* Update using {@code $addToSet} modifier.
* Allows creation of {@code $push} command for single or multiple (using {@code $each}) values
- *
+ *
* @param key
* @return
* @since 1.5
@@ -208,7 +210,7 @@ public AddToSetBuilder addToSet(String key) {
/**
* Update using the {@literal $addToSet} update modifier
- *
+ *
* @see http://docs.mongodb.org/manual/reference/operator/update/addToSet/
* @param key
* @param value
@@ -221,7 +223,7 @@ public Update addToSet(String key, Object value) {
/**
* Update using the {@literal $pop} update modifier
- *
+ *
* @see http://docs.mongodb.org/manual/reference/operator/update/pop/
* @param key
* @param pos
@@ -234,7 +236,7 @@ public Update pop(String key, Position pos) {
/**
* Update using the {@literal $pull} update modifier
- *
+ *
* @see http://docs.mongodb.org/manual/reference/operator/update/pull/
* @param key
* @param value
@@ -247,7 +249,7 @@ public Update pull(String key, Object value) {
/**
* Update using the {@literal $pullAll} update modifier
- *
+ *
* @see http://docs.mongodb.org/manual/reference/operator/update/pullAll/
* @param key
* @param values
@@ -260,7 +262,7 @@ public Update pullAll(String key, Object[] values) {
/**
* Update using the {@literal $rename} update modifier
- *
+ *
* @see http://docs.mongodb.org/manual/reference/operator/update/rename/
* @param oldName
* @param newName
@@ -273,7 +275,7 @@ public Update rename(String oldName, String newName) {
/**
* Update given key to current date using {@literal $currentDate} modifier.
- *
+ *
* @see http://docs.mongodb.org/manual/reference/operator/update/currentDate/
* @param key
* @return
@@ -287,7 +289,7 @@ public Update currentDate(String key) {
/**
* Update given key to current date using {@literal $currentDate : { $type : "timestamp" }} modifier.
- *
+ *
* @see http://docs.mongodb.org/manual/reference/operator/update/currentDate/
* @param key
* @return
@@ -301,7 +303,7 @@ public Update currentTimestamp(String key) {
/**
* Multiply the value of given key by the given number.
- *
+ *
* @see http://docs.mongodb.org/manual/reference/operator/update/mul/
* @param key must not be {@literal null}.
* @param multiplier must not be {@literal null}.
@@ -315,9 +317,43 @@ public Update multiply(String key, Number multiplier) {
return this;
}
+ /**
+ * Update given key to the {@code value} if the {@code value} is greater than the current value of the field.
+ *
+ * @see http://docs.mongodb.org/manual/reference/operator/update/max/
+ * @see https://docs.mongodb.org/manual/reference/bson-types/#faq-dev-compare-order-for-bson-types
+ * @param key must not be {@literal null}.
+ * @param value must not be {@literal null}.
+ * @return
+ * @since 1.10
+ */
+ public Update max(String key, Object value) {
+
+ Assert.notNull(value, "Value for max operation must not be 'null'.");
+ addMultiFieldOperation("$max", key, value);
+ return this;
+ }
+
+ /**
+ * Update given key to the {@code value} if the {@code value} is less than the current value of the field.
+ *
+ * @see http://docs.mongodb.org/manual/reference/operator/update/min/
+ * @see https://docs.mongodb.org/manual/reference/bson-types/#faq-dev-compare-order-for-bson-types
+ * @param key must not be {@literal null}.
+ * @param value must not be {@literal null}.
+ * @return
+ * @since 1.10
+ */
+ public Update min(String key, Object value) {
+
+ Assert.notNull(value, "Value for min operation must not be 'null'.");
+ addMultiFieldOperation("$min", key, value);
+ return this;
+ }
+
/**
* The operator supports bitwise {@code and}, bitwise {@code or}, and bitwise {@code xor} operations.
- *
+ *
* @param key
* @return
* @since 1.7
@@ -332,7 +368,7 @@ public DBObject getUpdateObject() {
/**
* This method is not called anymore rather override {@link #addMultiFieldOperation(String, String, Object)}.
- *
+ *
* @param operator
* @param key
* @param value
@@ -371,7 +407,7 @@ protected void addMultiFieldOperation(String operator, String key, Object value)
/**
* Determine if a given {@code key} will be touched on execution.
- *
+ *
* @param key
* @return
*/
@@ -381,7 +417,7 @@ public boolean modifies(String key) {
/**
* Inspects given {@code key} for '$'.
- *
+ *
* @param key
* @return
*/
@@ -389,7 +425,7 @@ private static boolean isKeyword(String key) {
return StringUtils.startsWithIgnoreCase(key, "$");
}
- /*
+ /*
* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
@@ -398,7 +434,7 @@ public int hashCode() {
return getUpdateObject().hashCode();
}
- /*
+ /*
* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
@@ -428,7 +464,7 @@ public String toString() {
/**
* Modifiers holds a distinct collection of {@link Modifier}
- *
+ *
* @author Christoph Strobl
* @author Thomas Darimont
*/
@@ -478,7 +514,7 @@ public boolean equals(Object obj) {
/**
* Marker interface of nested commands.
- *
+ *
* @author Christoph Strobl
*/
public static interface Modifier {
@@ -496,7 +532,7 @@ public static interface Modifier {
/**
* Implementation of {@link Modifier} representing {@code $each}.
- *
+ *
* @author Christoph Strobl
* @author Thomas Darimont
*/
@@ -539,7 +575,7 @@ public Object getValue() {
return this.values;
}
- /*
+ /*
* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
@@ -548,7 +584,7 @@ public int hashCode() {
return nullSafeHashCode(values);
}
- /*
+ /*
* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
@@ -569,7 +605,7 @@ public boolean equals(Object that) {
/**
* {@link Modifier} implementation used to propagate {@code $position}.
- *
+ *
* @author Christoph Strobl
* @since 1.7
*/
@@ -594,7 +630,7 @@ public Object getValue() {
/**
* Builder for creating {@code $push} modifiers
- *
+ *
* @author Christoph Strobl
* @author Thomas Darimont
*/
@@ -610,7 +646,7 @@ public class PushOperatorBuilder {
/**
* Propagates {@code $each} to {@code $push}
- *
+ *
* @param values
* @return
*/
@@ -622,7 +658,7 @@ public Update each(Object... values) {
/**
* Forces values to be added at the given {@literal position}.
- *
+ *
* @param position needs to be greater than or equal to zero.
* @return
* @since 1.7
@@ -640,7 +676,7 @@ public PushOperatorBuilder atPosition(int position) {
/**
* Forces values to be added at given {@literal position}.
- *
+ *
* @param position can be {@literal null} which will be appended at the last position.
* @return
* @since 1.7
@@ -658,7 +694,7 @@ public PushOperatorBuilder atPosition(Position position) {
/**
* Propagates {@link #value(Object)} to {@code $push}
- *
+ *
* @param values
* @return
*/
@@ -666,7 +702,7 @@ public Update value(Object value) {
return Update.this.push(key, value);
}
- /*
+ /*
* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
@@ -682,7 +718,7 @@ public int hashCode() {
return result;
}
- /*
+ /*
* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
@@ -713,7 +749,7 @@ private Update getOuterType() {
/**
* Builder for creating {@code $addToSet} modifier.
- *
+ *
* @author Christoph Strobl
* @since 1.5
*/
@@ -727,7 +763,7 @@ public AddToSetBuilder(String key) {
/**
* Propagates {@code $each} to {@code $addToSet}
- *
+ *
* @param values
* @return
*/
@@ -737,7 +773,7 @@ public Update each(Object... values) {
/**
* Propagates {@link #value(Object)} to {@code $addToSet}
- *
+ *
* @param values
* @return
*/
@@ -767,7 +803,7 @@ public String toString() {
/**
* Creates a new {@link BitwiseOperatorBuilder}.
- *
+ *
* @param reference must not be {@literal null}
* @param key must not be {@literal null}
*/
@@ -782,7 +818,7 @@ protected BitwiseOperatorBuilder(Update reference, String key) {
/**
* Updates to the result of a bitwise and operation between the current value and the given one.
- *
+ *
* @param value
* @return
*/
@@ -794,7 +830,7 @@ public Update and(long value) {
/**
* Updates to the result of a bitwise or operation between the current value and the given one.
- *
+ *
* @param value
* @return
*/
@@ -806,7 +842,7 @@ public Update or(long value) {
/**
* Updates to the result of a bitwise xor operation between the current value and the given one.
- *
+ *
* @param value
* @return
*/
diff --git a/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/MongoTemplateTests.java b/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/MongoTemplateTests.java
index 86ce2a08b6..43ba0fe8cf 100644
--- a/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/MongoTemplateTests.java
+++ b/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/MongoTemplateTests.java
@@ -24,14 +24,17 @@
import static org.springframework.data.mongodb.core.query.Query.*;
import static org.springframework.data.mongodb.core.query.Update.*;
+import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Calendar;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import org.bson.types.ObjectId;
@@ -94,7 +97,7 @@
/**
* Integration test for {@link MongoTemplate}.
- *
+ *
* @author Oliver Gierke
* @author Thomas Risberg
* @author Amol Nayak
@@ -102,6 +105,7 @@
* @author Thomas Darimont
* @author Komi Innocent
* @author Christoph Strobl
+ * @author Mark Paluch
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:infrastructure.xml")
@@ -3164,6 +3168,194 @@ public void updateShouldWorkForTypesContainingGeoJsonTypes() {
assertThat(template.findOne(query(where("id").is(wgj.id)), WithGeoJson.class).point, is(equalTo(wgj.point)));
}
+ /**
+ * @see DATAMONGO-1404
+ */
+ @Test
+ public void updatesDateValueCorrectlyWhenUsingMinOperator() {
+
+ Calendar cal = Calendar.getInstance(Locale.US);
+ cal.set(2013, 10, 13, 0, 0, 0);
+
+ TypeWithDate twd = new TypeWithDate();
+ twd.date = new Date();
+ template.save(twd);
+ template.updateFirst(query(where("id").is(twd.id)), new Update().min("date", cal.getTime()), TypeWithDate.class);
+
+ TypeWithDate loaded = template.find(query(where("id").is(twd.id)), TypeWithDate.class).get(0);
+ assertThat(loaded.date, equalTo(cal.getTime()));
+ }
+
+ /**
+ * @see DATAMONGO-1404
+ */
+ @Test
+ public void updatesNumericValueCorrectlyWhenUsingMinOperator() {
+
+ TypeWithNumbers twn = new TypeWithNumbers();
+ twn.byteVal = 100;
+ twn.doubleVal = 200D;
+ twn.floatVal = 300F;
+ twn.intVal = 400;
+ twn.longVal = 500L;
+
+ // Note that $min operator uses String comparison for BigDecimal/BigInteger comparison according to BSON sort rules.
+ twn.bigIntegerVal = new BigInteger("600");
+ twn.bigDeciamVal = new BigDecimal("700.0");
+
+ template.save(twn);
+
+ byte byteVal = 90;
+ Update update = new Update()//
+ .min("byteVal", byteVal) //
+ .min("doubleVal", 190D) //
+ .min("floatVal", 290F) //
+ .min("intVal", 390) //
+ .min("longVal", 490) //
+ .min("bigIntegerVal", new BigInteger("590")) //
+ .min("bigDeciamVal", new BigDecimal("690")) //
+ ;
+
+ template.updateFirst(query(where("id").is(twn.id)), update, TypeWithNumbers.class);
+
+ TypeWithNumbers loaded = template.find(query(where("id").is(twn.id)), TypeWithNumbers.class).get(0);
+ assertThat(loaded.byteVal, equalTo(byteVal));
+ assertThat(loaded.doubleVal, equalTo(190D));
+ assertThat(loaded.floatVal, equalTo(290F));
+ assertThat(loaded.intVal, equalTo(390));
+ assertThat(loaded.longVal, equalTo(490L));
+ assertThat(loaded.bigIntegerVal, equalTo(new BigInteger("590")));
+ assertThat(loaded.bigDeciamVal, equalTo(new BigDecimal("690")));
+ }
+
+ /**
+ * @see DATAMONGO-1404
+ */
+ @Test
+ public void updatesDateValueCorrectlyWhenUsingMaxOperator() {
+
+ Calendar cal = Calendar.getInstance(Locale.US);
+ cal.set(2013, 10, 13, 0, 0, 0);
+
+ TypeWithDate twd = new TypeWithDate();
+ twd.date = cal.getTime();
+ template.save(twd);
+
+ cal.set(2019, 10, 13, 0, 0, 0);
+ template.updateFirst(query(where("id").is(twd.id)), new Update().max("date", cal.getTime()), TypeWithDate.class);
+
+ TypeWithDate loaded = template.find(query(where("id").is(twd.id)), TypeWithDate.class).get(0);
+ assertThat(loaded.date, equalTo(cal.getTime()));
+ }
+
+ /**
+ * @see DATAMONGO-1404
+ */
+ @Test
+ public void updatesNumericValueCorrectlyWhenUsingMaxOperator() {
+
+ TypeWithNumbers twn = new TypeWithNumbers();
+ twn.byteVal = 100;
+ twn.doubleVal = 200D;
+ twn.floatVal = 300F;
+ twn.intVal = 400;
+ twn.longVal = 500L;
+
+ // Note that $max operator uses String comparison for BigDecimal/BigInteger comparison according to BSON sort rules.
+ twn.bigIntegerVal = new BigInteger("600");
+ twn.bigDeciamVal = new BigDecimal("700.0");
+
+ template.save(twn);
+
+ byte byteVal = 101;
+ Update update = new Update()//
+ .max("byteVal", byteVal) //
+ .max("doubleVal", 290D) //
+ .max("floatVal", 390F) //
+ .max("intVal", 490) //
+ .max("longVal", 590) //
+ .max("bigIntegerVal", new BigInteger("690")) //
+ .max("bigDeciamVal", new BigDecimal("790")) //
+ ;
+
+ template.updateFirst(query(where("id").is(twn.id)), update, TypeWithNumbers.class);
+
+ TypeWithNumbers loaded = template.find(query(where("id").is(twn.id)), TypeWithNumbers.class).get(0);
+ assertThat(loaded.byteVal, equalTo(byteVal));
+ assertThat(loaded.doubleVal, equalTo(290D));
+ assertThat(loaded.floatVal, equalTo(390F));
+ assertThat(loaded.intVal, equalTo(490));
+ assertThat(loaded.longVal, equalTo(590L));
+ assertThat(loaded.bigIntegerVal, equalTo(new BigInteger("690")));
+ assertThat(loaded.bigDeciamVal, equalTo(new BigDecimal("790")));
+ }
+
+ /**
+ * @see DATAMONGO-1404
+ */
+ @Test
+ public void updatesBigNumberValueUsingStringComparisonWhenUsingMaxOperator() {
+
+ TypeWithNumbers twn = new TypeWithNumbers();
+
+ // Note that $max operator uses String comparison for BigDecimal/BigInteger comparison according to BSON sort rules.
+ // Therefore "80" is considered greater than "700"
+ twn.bigIntegerVal = new BigInteger("600");
+ twn.bigDeciamVal = new BigDecimal("700.0");
+
+ template.save(twn);
+
+ Update update = new Update()//
+ .max("bigIntegerVal", new BigInteger("70")) //
+ .max("bigDeciamVal", new BigDecimal("80")) //
+ ;
+
+ template.updateFirst(query(where("id").is(twn.id)), update, TypeWithNumbers.class);
+
+ TypeWithNumbers loaded = template.find(query(where("id").is(twn.id)), TypeWithNumbers.class).get(0);
+ assertThat(loaded.bigIntegerVal, equalTo(new BigInteger("70")));
+ assertThat(loaded.bigDeciamVal, equalTo(new BigDecimal("80")));
+ }
+
+ /**
+ * @see DATAMONGO-1404
+ */
+ @Test
+ public void updatesBigNumberValueUsingStringComparisonWhenUsingMinOperator() {
+
+ TypeWithNumbers twn = new TypeWithNumbers();
+
+ // Note that $max operator uses String comparison for BigDecimal/BigInteger comparison according to BSON sort rules.
+ // Therefore "80" is considered greater than "700"
+ twn.bigIntegerVal = new BigInteger("80");
+ twn.bigDeciamVal = new BigDecimal("90.0");
+
+ template.save(twn);
+
+ Update update = new Update()//
+ .min("bigIntegerVal", new BigInteger("700")) //
+ .min("bigDeciamVal", new BigDecimal("800")) //
+ ;
+
+ template.updateFirst(query(where("id").is(twn.id)), update, TypeWithNumbers.class);
+
+ TypeWithNumbers loaded = template.find(query(where("id").is(twn.id)), TypeWithNumbers.class).get(0);
+ assertThat(loaded.bigIntegerVal, equalTo(new BigInteger("700")));
+ assertThat(loaded.bigDeciamVal, equalTo(new BigDecimal("800")));
+ }
+
+ static class TypeWithNumbers {
+
+ @Id String id;
+ Integer intVal;
+ Float floatVal;
+ Long longVal;
+ Double doubleVal;
+ BigDecimal bigDeciamVal;
+ BigInteger bigIntegerVal;
+ Byte byteVal;
+ }
+
static class DoucmentWithNamedIdField {
@Id String someIdKey;
@@ -3215,11 +3407,11 @@ static class DocumentWithDBRefCollection {
@Id public String id;
- @Field("db_ref_list")/** @see DATAMONGO-1058 */
- @org.springframework.data.mongodb.core.mapping.DBRef//
+ @Field("db_ref_list") /** @see DATAMONGO-1058 */
+ @org.springframework.data.mongodb.core.mapping.DBRef //
public List dbRefAnnotatedList;
- @org.springframework.data.mongodb.core.mapping.DBRef//
+ @org.springframework.data.mongodb.core.mapping.DBRef //
public Sample dbRefProperty;
}
diff --git a/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/convert/UpdateMapperUnitTests.java b/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/convert/UpdateMapperUnitTests.java
index feca9d76b9..c27ac91b9d 100644
--- a/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/convert/UpdateMapperUnitTests.java
+++ b/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/convert/UpdateMapperUnitTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2015 the original author or authors.
+ * Copyright 2013-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -63,10 +63,11 @@
/**
* Unit tests for {@link UpdateMapper}.
- *
+ *
* @author Oliver Gierke
* @author Christoph Strobl
* @author Thomas Darimont
+ * @author Mark Paluch
*/
@RunWith(MockitoJUnitRunner.class)
public class UpdateMapperUnitTests {
@@ -687,10 +688,8 @@ public void mappingShouldRetainTypeInformationOfNestedListWhenUpdatingConcreteyP
context.getPersistentEntity(DomainTypeWrappingConcreteyTypeHavingListOfInterfaceTypeAttributes.class));
assertThat(mappedUpdate, isBsonObject().notContaining("$set.concreteTypeWithListAttributeOfInterfaceType._class"));
- assertThat(
- mappedUpdate,
- isBsonObject().containing("$set.concreteTypeWithListAttributeOfInterfaceType.models.[0]._class",
- ModelImpl.class.getName()));
+ assertThat(mappedUpdate, isBsonObject()
+ .containing("$set.concreteTypeWithListAttributeOfInterfaceType.models.[0]._class", ModelImpl.class.getName()));
}
/**
@@ -757,8 +756,8 @@ public void mappingShouldRetrainTypeInformationWhenValueTypeOfMapDoesNotMatchIts
@Test
public void mappingShouldNotContainTypeInformationWhenValueTypeOfMapMatchesDeclaration() {
- Map