title: Spring data - MongoDB: aggregation pipeline updates did not work
body: <p>It's simple example from <a href="https://docs.spring.io/spring-data/mongodb/docs/current/reference/html/#mongo-template.aggregation-update" rel="nofollow noreferrer">https://docs.spring.io/spring-data/mongodb/docs/current/reference/html/#mongo-template.aggregation-update</a>:</p>
  
  <pre><code>Aggregation.newUpdate().set("average").toValue(ArithmeticOperators.valueOf("tests").avg());
  </code></pre>
  
  <p>When I run it the result is:</p>
  
  <pre><code>Caused by: java.lang.UnsupportedOperationException: null
      at java.base/java.util.AbstractList.add(AbstractList.java:153) ~[na:na]
      at java.base/java.util.AbstractList.add(AbstractList.java:111) ~[na:na]
      at org.springframework.data.mongodb.core.aggregation.AggregationUpdate.set(AggregationUpdate.java:142) ~[spring-data-mongodb-3.0.0.RELEASE.jar:3.0.0.RELEASE]
      at org.springframework.data.mongodb.core.aggregation.AggregationUpdate$1.toValue(AggregationUpdate.java:207) ~[spring-data-mongodb-3.0.0.RELEASE.jar:3.0.0.RELEASE] 
  </code></pre>
  
  <p>Has anyone tried to use aggregation pipeline updates in spring data?</p>