ValidationEnforcer implements JobValidator { @Nullable @Override public List<String> validate(@NonNull JobParameters job) { return validator.validate(job); } ValidationEnforcer(@NonNull JobValidator validator); @Nullable @Override List<String> validate(@NonNull JobParameters job); @Nullable @Override List<String> validate(@NonNull JobTrigger trigger); @Nullable @Override List<String> validate(@NonNull RetryStrategy retryStrategy); final boolean isValid(@NonNull JobParameters job); final boolean isValid(@NonNull JobTrigger trigger); final boolean isValid(@NonNull RetryStrategy retryStrategy); final void ensureValid(@NonNull JobParameters job); final void ensureValid(@NonNull JobTrigger trigger); final void ensureValid(@NonNull RetryStrategy retryStrategy);  }
@Test public void testValidate_retryStrategy() throws Exception { enforcer.validate(retryStrategy); verify(validator).validate(retryStrategy); }
@Test public void testValidate_jobSpec() throws Exception { enforcer.validate(mockJobParameters); verify(validator).validate(mockJobParameters); }
@Test public void testValidate_trigger() throws Exception { enforcer.validate(mockTrigger); verify(validator).validate(mockTrigger); }