ValidationResultImpl implements ValidationResult { @Override public boolean isValid() { return valid; } ValidationResultImpl(boolean valid, String detail); @Override boolean isValid(); @Override String getDetail(); static ValidationResult create(ValidationResult result);  }
@Test public void testIsValid() throws Exception { ValidationResult result = new ValidationResultImpl(true, "detail"); Assert.assertTrue(result.isValid()); result = new ValidationResultImpl(false, "detail"); Assert.assertFalse(result.isValid()); }