@Test(expected = UnsupportedOperationException.class) public void usingMethodShouldThrowNotImplemented() throws InvalidClassException { RuleAdapter ruleAdapter = new RuleAdapter(new SampleRuleWithResult()); ruleAdapter.addFactNameFilter(); }
@Override public void addFactNameFilter(String... factNames) { throw new UnsupportedOperationException(); }
RuleAdapter implements Rule { @Override public void addFactNameFilter(String... factNames) { throw new UnsupportedOperationException(); } }
RuleAdapter implements Rule { @Override public void addFactNameFilter(String... factNames) { throw new UnsupportedOperationException(); } RuleAdapter(Object pojoRule, Rule rule); @SuppressWarnings("unchecked")  RuleAdapter(Object pojoRule); }
RuleAdapter implements Rule { @Override public void addFactNameFilter(String... factNames) { throw new UnsupportedOperationException(); } RuleAdapter(Object pojoRule, Rule rule); @SuppressWarnings("unchecked")  RuleAdapter(Object pojoRule); @Override void addFacts(NameValueReferable... facts); @Override void addFacts(NameValueReferableMap facts); @Override void setFacts(NameValueReferableMap facts); @Override @SuppressWarnings("unchecked") void setCondition(Predicate condition); @Override void setRuleState(RuleState ruleState); @Override @SuppressWarnings("unchecked") void addAction(Consumer action); @Override @SuppressWarnings("unchecked") void addAction(BiConsumer action); @Override void addFactNameFilter(String... factNames); @Override NameValueReferableMap getFacts(); @Override @SuppressWarnings("unchecked") Predicate<NameValueReferableMap> getCondition(); @Override RuleState getRuleState(); @Override @SuppressWarnings("unchecked") List<Object> getActions(); @Override @SuppressWarnings("unchecked") boolean invoke(NameValueReferableMap facts); @Override @SuppressWarnings("unchecked") void setResult(Result result); @Override Optional<Result> getResult(); }
RuleAdapter implements Rule { @Override public void addFactNameFilter(String... factNames) { throw new UnsupportedOperationException(); } RuleAdapter(Object pojoRule, Rule rule); @SuppressWarnings("unchecked")  RuleAdapter(Object pojoRule); @Override void addFacts(NameValueReferable... facts); @Override void addFacts(NameValueReferableMap facts); @Override void setFacts(NameValueReferableMap facts); @Override @SuppressWarnings("unchecked") void setCondition(Predicate condition); @Override void setRuleState(RuleState ruleState); @Override @SuppressWarnings("unchecked") void addAction(Consumer action); @Override @SuppressWarnings("unchecked") void addAction(BiConsumer action); @Override void addFactNameFilter(String... factNames); @Override NameValueReferableMap getFacts(); @Override @SuppressWarnings("unchecked") Predicate<NameValueReferableMap> getCondition(); @Override RuleState getRuleState(); @Override @SuppressWarnings("unchecked") List<Object> getActions(); @Override @SuppressWarnings("unchecked") boolean invoke(NameValueReferableMap facts); @Override @SuppressWarnings("unchecked") void setResult(Result result); @Override Optional<Result> getResult();  }