@Test
public void whenTaskNameToUpdateIsNotDuplicatedExpectTaskIsValid() {

    duplicatedTaskTemplate.setId(TASK_ID);
    when(taskTemplateRepository.get(VALID_TASK_NAME)).thenReturn(Collections.singletonList(
            duplicatedTaskTemplate));
    ValidationResult validationResult = taskValidation
            .isUpdateNameValid(TASK_ID, VALID_TASK_NAME);
    assertThat(validationResult.getValidationStatus(), is(ValidationStatus.VALID));
}