### Question:
OneTimeTokenValidationImpl extends AbstractSimpleStringValidation implements OneTimeTokenValidation { @Override protected void validate(ValidationContext<String> context) { validateNotNull(context); if (context.isInValid()) { return; } validateSameLengthWhenTrimmed(context); validateLength(context); validateOnlyAlphabeticDigitOrAllowedParts(context); }    }### Answer:
@Test public void valid_token_is_valid() { assertTrue(validationToTest.validate(VALID_EXAMPLETOKEN).isValid()); }
@Test public void a_token_containing_only_40_chars_is_valid() { StringBuilder sb = new StringBuilder(); for (int i=0;i<40;i++) { sb.append('A'); } assertTrue(validationToTest.validate(sb.toString()).isValid()); }
@Test public void a_token_containing_only_40_underscores_is_invvalid() { StringBuilder sb = new StringBuilder(); for (int i=0;i<40;i++) { sb.append('_'); } assertFalse(validationToTest.validate(sb.toString()).isValid()); }
@Test public void a_token_with_length_10_is_invalid() { assertFalse(validationToTest.validate("1234567890").isValid()); }