RequiredRuleExecutor implements RuleExecutor<Object, Object> { public boolean validate(Object model, Object argument) throws Exception { return !ValidationRulesUtils.isEmpty(model); }  boolean validate(Object model, Object argument);  }
@Test public void testValidate() throws Exception { RequiredRuleExecutor executor = new RequiredRuleExecutor(); assertTrue(executor.validate(123, null)); assertTrue(executor.validate("test", null)); assertFalse(executor.validate("", null)); assertFalse(executor.validate(null, null)); }