diff --git a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/json/patch/AddOperationUnitTests.java b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/json/patch/AddOperationUnitTests.java index 8474f8f3f..6af870902 100755 --- a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/json/patch/AddOperationUnitTests.java +++ b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/json/patch/AddOperationUnitTests.java @@ -78,6 +78,17 @@ public void addItemToList() throws Exception { assertFalse(todos.get(3).isComplete()); } + @Test + public void addItemToEndOfArray() { + + List todos = new ArrayList(); + todos.add(new Todo(1L, "A", false)); + + AddOperation add = AddOperation.of("/1", new Todo(2L, "B", true)); + add.perform(todos, Todo.class); + assertEquals("B", todos.get(1).getDescription()); + } + @Test // DATAREST-995 public void addsItemsToNestedList() {