### Question:
ProjectIdValidationImpl extends AbstractSimpleStringValidation implements ProjectIdValidation { @Override protected void validate(ValidationContext<String> context) { validateNotNull(context); if (context.isInValid()) { return; } validateNoUpperCaseCharacters(context); validateSameLengthWhenTrimmed(context); validateLength(context); validateOnlyAlphabeticDigitOrAllowedParts(context, '-', '_'); }   static final int PROJECTID_LENGTH_MIN; static final int PROJECTID_LENGTH_MAX; }### Answer:
@Test public void lengthTest(){ ValidationResult projectIdValidationResult = validationToTest.validate("ab"); assertTrue("Project id not valid", projectIdValidationResult.isValid()); }
@Test public void containsExlamationMarkIsNotValid(){ ValidationResult projectIdValidationResult = validationToTest.validate("ab!d"); assertFalse("Project id backslash forbidden, but accepted?!?", projectIdValidationResult.isValid()); }
@Test public void containsColonIsNotValid(){ ValidationResult projectIdValidationResult = validationToTest.validate("AB:D".toLowerCase()); assertFalse("Project id backslash forbidden, but accepted?!?", projectIdValidationResult.isValid()); }
@Test public void lengthTooShortTest(){ ValidationResult projectIdValidationResult = validationToTest.validate("a"); assertFalse("Project id is not too short.", projectIdValidationResult.isValid()); }
@Test public void ABCDIsNOTValidBecauseUppercaseCharactersNotAllowed(){ ValidationResult projectIdValidationResult = validationToTest.validate("ABCD"); assertFalse("Project id is not okay, but should?!?", projectIdValidationResult.isValid()); }
@Test public void abcdIsValid(){ ValidationResult projectIdValidationResult = validationToTest.validate("abcd"); assertTrue("Project id is not okay, but should?!?", projectIdValidationResult.isValid()); }
@Test public void containsDotIsNotValid(){ ValidationResult projectIdValidationResult = validationToTest.validate("ab.d"); assertFalse("Project id dot forbidden, but accepted?!?", projectIdValidationResult.isValid()); }
@Test public void containsSlashIsNotValid(){ ValidationResult projectIdValidationResult = validationToTest.validate("ab/d"); assertFalse("Project id slash forbidden, but accepted?!?", projectIdValidationResult.isValid()); }
@Test public void containsBackSlashIsNotValid(){ ValidationResult projectIdValidationResult = validationToTest.validate("ab\\d"); assertFalse("Project id backslash forbidden, but accepted?!?", projectIdValidationResult.isValid()); }
@Test public void containsDollorIsNotValid(){ ValidationResult projectIdValidationResult = validationToTest.validate("ab$d"); assertFalse("Project id backslash forbidden, but accepted?!?", projectIdValidationResult.isValid()); }
@Test public void containsPercentageIsNotValid(){ ValidationResult projectIdValidationResult = validationToTest.validate("ab$d"); assertFalse("Project id backslash forbidden, but accepted?!?", projectIdValidationResult.isValid()); }
@Test public void containsQuestionMarkIsNotValid(){ ValidationResult projectIdValidationResult = validationToTest.validate("ab?d"); assertFalse("Project id backslash forbidden, but accepted?!?", projectIdValidationResult.isValid()); }