@Test public void testGetHasTypeRefs() { final Expression expression1 = mock(Expression.class); final Expression expression2 = mock(Expression.class); final List<HasExpression> hasExpressions = asList(HasExpression.wrap(list, expression1), HasExpression.wrap(list, expression2)); final HasTypeRef hasTypeRef1 = mock(HasTypeRef.class); final HasTypeRef hasTypeRef2 = mock(HasTypeRef.class); doReturn(hasExpressions).when(list).getExpression(); when(expression1.getHasTypeRefs()).thenReturn(asList(hasTypeRef1)); when(expression2.getHasTypeRefs()).thenReturn(asList(hasTypeRef2)); final List<HasTypeRef> actualHasTypeRefs = list.getHasTypeRefs(); final List<HasTypeRef> expectedHasTypeRefs = asList(list, hasTypeRef1, hasTypeRef2); assertEquals(expectedHasTypeRefs, actualHasTypeRefs); }
@Override public java.util.List<HasTypeRef> getHasTypeRefs() { final java.util.List<HasTypeRef> hasTypeRefs = super.getHasTypeRefs(); hasTypeRefs.addAll(getFlatHasTypeRefsFromExpressions(getExpression())); return hasTypeRefs; }
List extends Expression { @Override public java.util.List<HasTypeRef> getHasTypeRefs() { final java.util.List<HasTypeRef> hasTypeRefs = super.getHasTypeRefs(); hasTypeRefs.addAll(getFlatHasTypeRefsFromExpressions(getExpression())); return hasTypeRefs; } }
List extends Expression { @Override public java.util.List<HasTypeRef> getHasTypeRefs() { final java.util.List<HasTypeRef> hasTypeRefs = super.getHasTypeRefs(); hasTypeRefs.addAll(getFlatHasTypeRefsFromExpressions(getExpression())); return hasTypeRefs; } List();  List(final Id id,
                final Description description,
                final QName typeRef,
                final java.util.List<HasExpression> expression); }
List extends Expression { @Override public java.util.List<HasTypeRef> getHasTypeRefs() { final java.util.List<HasTypeRef> hasTypeRefs = super.getHasTypeRefs(); hasTypeRefs.addAll(getFlatHasTypeRefsFromExpressions(getExpression())); return hasTypeRefs; } List();  List(final Id id,
                final Description description,
                final QName typeRef,
                final java.util.List<HasExpression> expression); @Override List copy(); java.util.List<HasExpression> getExpression(); @Override java.util.List<HasTypeRef> getHasTypeRefs(); @Override int getRequiredComponentWidthCount(); @Override boolean equals(final Object o); @Override int hashCode(); }
List extends Expression { @Override public java.util.List<HasTypeRef> getHasTypeRefs() { final java.util.List<HasTypeRef> hasTypeRefs = super.getHasTypeRefs(); hasTypeRefs.addAll(getFlatHasTypeRefsFromExpressions(getExpression())); return hasTypeRefs; } List();  List(final Id id,
                final Description description,
                final QName typeRef,
                final java.util.List<HasExpression> expression); @Override List copy(); java.util.List<HasExpression> getExpression(); @Override java.util.List<HasTypeRef> getHasTypeRefs(); @Override int getRequiredComponentWidthCount(); @Override boolean equals(final Object o); @Override int hashCode();  }