@Test
public void whenPlanNameIsAlreadyInDbWithDifferentIdExpectUpdateNameValidationPasses() {

    duplicatedPlanTemplate.setId(PLAN_ID + 1);
    when(planTemplateRepository.get(VALID_PLAN_NAME))
            .thenReturn(Collections.singletonList(duplicatedPlanTemplate));
    ValidationResult validationResult = planValidation.isUpdateNameValid(
            PLAN_ID, VALID_PLAN_NAME);
    assertThat(validationResult.getValidationStatus(), is(ValidationStatus.INVALID));
    assertThat(validationResult.getValidationInfo(), is(ERROR_MESSAGE_NAME_EXIST));
}