### Question:
CheckAllGroupPositionValidator implements ConstraintValidator<CheckAllGroupPosition, List<ClientQueryGroup>>,
        ValidationErrorDescriptorBuilder { @Override public ErrorDescriptor build(ConstraintViolation violation) { return QUERY_GROUPBY_ALLGROUP_NOT_FIRST.createDescriptor(violation.getPropertyPath().toString()); }  @Override void initialize(CheckAllGroupPosition constraintAnnotation); @Override boolean isValid(List<ClientQueryGroup> groups, ConstraintValidatorContext context); @Override ErrorDescriptor build(ConstraintViolation violation);  }### Answer:
@Test public void build_someViolationObject_ErrorDescription() { ConstraintViolation violation = mock(ConstraintViolation.class); Path path = mock(Path.class); when(path.toString()).thenReturn(TEST_PATH); when(violation.getPropertyPath()).thenReturn(path); ErrorDescriptor expected = (QUERY_GROUPBY_ALLGROUP_NOT_FIRST.createDescriptor(TEST_PATH)); ErrorDescriptor actual = objectUnderTests.build(violation); assertEquals(expected, actual); }