### Question:
ContextEntry extends DMNModelInstrumentedBase implements HasExpression,
                                                                      HasTypeRefs,
                                                                      HasVariable<InformationItem> { @Override public List<HasTypeRef> getHasTypeRefs() { final List<HasTypeRef> hasTypeRefs = new ArrayList<>(); hasTypeRefs.addAll(getNotNullHasTypeRefs(getExpression())); hasTypeRefs.addAll(getNotNullHasTypeRefs(getVariable())); return hasTypeRefs; }  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 testGetHasTypeRefs() { final Expression expression = mock(Expression.class); final InformationItem variable = mock(InformationItem.class); final HasTypeRef hasTypeRef1 = mock(HasTypeRef.class); final HasTypeRef hasTypeRef2 = mock(HasTypeRef.class); final HasTypeRef hasTypeRef3 = mock(HasTypeRef.class); final HasTypeRef hasTypeRef4 = mock(HasTypeRef.class); doReturn(expression).when(contextEntry).getExpression(); doReturn(variable).when(contextEntry).getVariable(); when(expression.getHasTypeRefs()).thenReturn(asList(hasTypeRef1, hasTypeRef2)); when(variable.getHasTypeRefs()).thenReturn(asList(hasTypeRef3, hasTypeRef4)); final List<HasTypeRef> actualHasTypeRefs = contextEntry.getHasTypeRefs(); final List<HasTypeRef> expectedHasTypeRefs = asList(hasTypeRef1, hasTypeRef2, hasTypeRef3, hasTypeRef4); assertEquals(expectedHasTypeRefs, actualHasTypeRefs); }