### Question:
ContextEntry extends DMNModelInstrumentedBase implements HasExpression,
                                                                      HasTypeRefs,
                                                                      HasVariable<InformationItem> { public ContextEntry copy() { final ContextEntry clonedContextEntry = new ContextEntry(); clonedContextEntry.variable = Optional.ofNullable(variable).map(InformationItem::copy).orElse(null); clonedContextEntry.expression = Optional.ofNullable(expression).map(Expression::copy).orElse(null); return clonedContextEntry; }  ContextEntry copy(); @Override InformationItem getVariable(); @Override void setVariable(final InformationItem value); @Override Expression getExpression(); @Override void setExpression(final Expression value); @Override DMNModelInstrumentedBase asDMNModelInstrumentedBase(); @Override boolean equals(final Object o); @Override int hashCode(); @Override List<HasTypeRef> getHasTypeRefs(); static final String DEFAULT_EXPRESSION_VALUE; }### Answer:
@Test public void testCopy() { final ContextEntry source = new ContextEntry(); final InformationItem informationItem = new InformationItem(new Id(ITEM_ID), new Description(DESCRIPTION), new Name(INFORMATION_ITEM_NAME), BuiltInType.BOOLEAN.asQName()); source.setVariable(informationItem); final ContextEntry target = source.copy(); assertNotNull(target); assertNull(target.getExpression()); assertNotNull(target.getVariable()); assertNotEquals(ITEM_ID, target.getVariable().getId().getValue()); assertEquals(DESCRIPTION, target.getVariable().getDescription().getValue()); assertEquals(INFORMATION_ITEM_NAME, target.getVariable().getName().getValue()); assertEquals(BuiltInType.BOOLEAN.asQName(), target.getVariable().getTypeRef()); }