### Question:
DecisionRule extends DMNElement implements HasTypeRefs { public DecisionRule copy() { DecisionRule clonedDecisionRule = new DecisionRule(); clonedDecisionRule.description = Optional.ofNullable(description).map(Description::copy).orElse(null); clonedDecisionRule.inputEntry = inputEntry.stream().map(UnaryTests::copy).collect(Collectors.toList()); clonedDecisionRule.outputEntry = outputEntry.stream().map(LiteralExpression::copy).collect(Collectors.toList()); clonedDecisionRule.annotationEntry = Optional.ofNullable(annotationEntry) .map(annotationEntryList -> annotationEntryList.stream().map(RuleAnnotationClauseText::copy).collect(Collectors.toList())) .orElse(null); return clonedDecisionRule; } DecisionRule();  DecisionRule(final Id id,
                        final Description description,
                        final List<UnaryTests> inputEntry,
                        final List<LiteralExpression> outputEntry); DecisionRule copy(); List<RuleAnnotationClauseText> getAnnotationEntry(); List<UnaryTests> getInputEntry(); List<LiteralExpression> getOutputEntry(); @Override List<HasTypeRef> getHasTypeRefs(); @Override boolean equals(final Object o); @Override int hashCode();  }### Answer:
@Test public void testCopy() { final DecisionRule source = new DecisionRule(new Id(DECISION_RULE_ID), new Description(DESCRIPTION), new ArrayList<>(), new ArrayList<>()); final DecisionRule target = source.copy(); assertNotNull(target); assertNotEquals(DECISION_RULE_ID, target.getId().getValue()); assertEquals(DESCRIPTION, target.getDescription().getValue()); assertTrue(target.getInputEntry().isEmpty()); assertTrue(target.getOutputEntry().isEmpty()); }