assertEquals(2, vr.getMessageCount("field1"));
assertContainsMessage(vm, vr.getMessages());
assertContainsMessage(vm, vr.getMessages("field1"));
assertContainsMessage(vm, vr.getMessages(Severity.ERROR));
DefaultValidationResults vr2 = new DefaultValidationResults();
vm = new DefaultValidationMessage("newField", Severity.INFO, "message");
vr2.addMessage(vm);
ValidationMessage vm2 = new DefaultValidationMessage("newField", Severity.ERROR, "message");
vr2.addMessage(vm2);
vr.addAllMessages(vr2.getMessages());
assertEquals(6, vr.getMessageCount());
assertEquals(3, vr.getMessageCount(Severity.ERROR));
assertEquals(2, vr.getMessageCount(Severity.INFO));
assertEquals(2, vr.getMessageCount("newField"));
assertContainsMessage(vm, vr.getMessages());