@Test
void testValidateCheckForDifferentProfile() throws Exception {
Vtor vtor = new Vtor();
vtor.useProfile("profil1");
Map<String, List<Check>> constraints = new HashMap<>();
ValidationConstraint testCheck1Constraint = mock(ValidationConstraint.class);
ValidationConstraint testCheck2Constraint = mock(ValidationConstraint.class);
Check ch1 = createCheckWithProfile("check1", "profil1", testCheck1Constraint);
Check ch2 = createCheckWithProfile("check2", "profil2", testCheck2Constraint);
List<Check> checks = new ArrayList<>();
checks.add(ch1);
checks.add(ch2);
constraints.put("testField", checks);
List<Violation> violations = vtor.validate(mockValidationContext(constraints), new ValidateTestObject("testValue"), "testField");
assertEquals(1, violations.size());
assertEquals("profil1", violations.get(0).getCheck().getProfiles()[0]);
verify(testCheck1Constraint).isValid(any(ValidationConstraintContext.class), eq("testValue"));
verify(testCheck2Constraint, never()).isValid(any(ValidationConstraintContext.class), eq("testValue"));
}