fix: addItem method in EventSourcedBehavior docs (#30419)

This commit is contained in:
Renato Cavalcanti 2021-07-27 10:48:46 +02:00 committed by GitHub
parent 8d07c055ec
commit a71033a78e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -130,7 +130,7 @@ public class BasicPersistentBehaviorTest {
List<String> newItems = new ArrayList<>(items);
newItems.add(0, data);
// keep 5 items
List<String> latest = newItems.subList(0, Math.min(4, newItems.size() - 1));
List<String> latest = newItems.subList(0, Math.min(5, newItems.size()));
return new State(latest);
}
}