### Question:
OutputClause extends DMNElement implements HasTypeRef,
                                                        DomainObject { @Override public List<HasTypeRef> getHasTypeRefs() { final List<HasTypeRef> hasTypeRefs = new ArrayList<>(singletonList(this)); hasTypeRefs.addAll(getNotNullHasTypeRefs(getDefaultOutputEntry())); return hasTypeRefs; } OutputClause();  OutputClause(final Id id,
                        final Description description,
                        final OutputClauseUnaryTests outputValues,
                        final OutputClauseLiteralExpression defaultOutputEntry,
                        final String name,
                        final QName typeRef); OutputClause copy(); @Override List<HasTypeRef> getHasTypeRefs(); String getStunnerCategory(); Set<String> getStunnerLabels(); OutputClauseUnaryTests getOutputValues(); void setOutputValues(final OutputClauseUnaryTests value); OutputClauseLiteralExpression getDefaultOutputEntry(); void setDefaultOutputEntry(final OutputClauseLiteralExpression value); String getName(); void setName(final String value); @Override QName getTypeRef(); @Override void setTypeRef(final QName value); @Override DMNModelInstrumentedBase asDMNModelInstrumentedBase(); @Override String getDomainObjectUUID(); @Override String getDomainObjectNameTranslationKey(); @Override boolean equals(final Object o); @Override int hashCode();  }### Answer:
@Test public void testGetHasTypeRefs() { final OutputClauseLiteralExpression outputClauseLiteralExpression = mock(OutputClauseLiteralExpression.class); final HasTypeRef hasTypeRef1 = mock(HasTypeRef.class); final HasTypeRef hasTypeRef2 = mock(HasTypeRef.class); doReturn(outputClauseLiteralExpression).when(outputClause).getDefaultOutputEntry(); when(outputClauseLiteralExpression.getHasTypeRefs()).thenReturn(asList(hasTypeRef1, hasTypeRef2)); final List<HasTypeRef> actualHasTypeRefs = outputClause.getHasTypeRefs(); final List<HasTypeRef> expectedHasTypeRefs = asList(outputClause, hasTypeRef1, hasTypeRef2); assertEquals(expectedHasTypeRefs, actualHasTypeRefs); }