@SuppressWarnings("unchecked")
@Test
public void testAddValidationErrors() {

	this.testee = new ValidationResult();
	
	ConstraintViolation<String> v1 = Mockito.mock(ConstraintViolation.class);
	Path v1Path = Mockito.mock(Path.class);
	Set<ConstraintViolation<String>> violations = new HashSet<>();
	violations.add(v1);
	
	Mockito.when(v1.getPropertyPath()).thenReturn(v1Path);
	Mockito.when(v1Path.toString()).thenReturn("a.b.c.field1");
	Mockito.when(v1.getMessage()).thenReturn("Bad!");
	
	this.testee.addValidationErrors(violations);
	
	Assert.assertEquals(1, this.testee.getTemplate().size());
	ValidationError.Model e = (ValidationError.Model) this.testee.getTemplate().get().get(0);
	Assert.assertEquals("a.b.c.field1", e.getCode());
	Assert.assertNull(e.getModelAlias());
	Assert.assertEquals("Bad!", e.getMsg());
}