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;
 }
Ejemplo n.º 2
0
 private EntityList mockEntityList(List<Entity> list) {
   EntityList entityList = mock(EntityList.class);
   when(entityList.iterator()).thenReturn(list.iterator());
   return entityList;
 }