### Question:
BeanUtils { public final Validator getValidator() { return new ValidatorImpl(); }  static Function<T, K> getTransformer(final Class<K> targetClass); static Function<T, K> getTransformer(final BeanTransformer beanTransformer, final Class<K> targetClass); final BeanTransformer getTransformer(); final Validator getValidator(); final Converter getPrimitiveTypeConverter();  }### Answer:
@Test public void testValidateWorksProperly() { ImmutableToFooMissingCustomAnnotation validBean = new ImmutableToFooMissingCustomAnnotation(NAME, ID.intValue()); underTest.getValidator().validate(validBean); }
@Test(expectedExceptions = InvalidBeanException.class) public void testValidateThrowsExceptionIfTheGivenBeanIsInvalid() { ImmutableToFoo immutableToFoo = new ImmutableToFoo(null, null, null, null, null); underTest.getValidator().validate(immutableToFoo); }