### Question:
CheckExpressionTypeValidator implements ConstraintValidator<CheckExpressionType, ClientExpressionContainer>, ValidationErrorDescriptorBuilder { @Override public boolean isValid(ClientExpressionContainer value, ConstraintValidatorContext context) { if (value == null || value.getObject() == null) { return true; } return acceptedExpressions.contains(value.getObject().getClass()); }  @Override void initialize(CheckExpressionType constraintAnnotation); @Override boolean isValid(ClientExpressionContainer value, ConstraintValidatorContext context); @Override ErrorDescriptor build(ConstraintViolation violation);  }### Answer:
@Test public void isValid_ClientOr_success() { boolean isValid = checkExpressionTypeValidator.isValid(new ClientExpressionContainer().setObject(new ClientOr()), null); assertThat(isValid, is(true)); }
@Test public void isValid_ClientNumber_NotValid() { boolean isValid = checkExpressionTypeValidator.isValid(new ClientExpressionContainer().setObject(new ClientNumber()), null); assertThat(isValid, is(false)); }
@Test public void isValid_whenClientExpressionContainerIsNull_returnTrue() { boolean isValid = checkExpressionTypeValidator.isValid(null, null); assertThat(isValid, is(true)); }
@Test public void isValid_whenObjectAndExpressionIsNull_returnTrue() { boolean isValid = checkExpressionTypeValidator.isValid(new ClientExpressionContainer() .setObject(null), null); assertThat(isValid, is(true)); }