@Test
public void destinationExistsPolicySkip() throws IOException {

    ConstraintValidatorContext context = mock(ConstraintValidatorContext.class);
    ConstraintViolationBuilder builder = mock(ConstraintViolationBuilder.class);
    when(context.buildConstraintViolationWithTemplate(anyString())).thenReturn(builder);
    SetMetadataParameters params = new SetMetadataParameters();
    params.setOutput(new FileTaskOutput(folder.newFile()));
    params.setExistingOutputPolicy(ExistingOutputPolicy.SKIP);
    assertFalse(victim.isValid(params, context));
    verify(context).buildConstraintViolationWithTemplate(contains("File destination already exists"));
}