private EntityList mockProductComponentsList(final Collection<Entity> productComponents) { EntityList productComponentsList = mock(EntityList.class); given(productComponentsList.iterator()).willReturn(productComponents.iterator()); given(productComponentsList.isEmpty()).willReturn(productComponents.isEmpty()); return productComponentsList; }