### Question:
EntityListImpl extends AbstractList<Entity> implements EntityList { @Override public boolean isEmpty() { if (entities == null) { loadEntities(); } return entities.isEmpty(); } EntityListImpl(final DataDefinition dataDefinition, final String joinFieldName, final Long parentId); @Override SearchCriteriaBuilder find(); @Override Entity get(final int index); @Override int size(); @Override boolean isEmpty(); @Override String toString();  }### Answer:
@Test public void shouldBeEmptyIfParentIdIsNull() throws Exception { DataDefinition dataDefinition = mock(DataDefinition.class); EntityListImpl list = new EntityListImpl(dataDefinition, "hasMany", null); assertTrue(list.isEmpty()); }