String associatedEntity = CSNUtil.getEntityName(serviceName, entityName, key); if(associatedEntity != null && !"".equals(associatedEntity.trim())) { entityDataBuilder.addAssociationElement(key, createFromDeepMap(serviceName, (Map<String, Object>)value, keys, associatedEntity, key)); }else { throw new IllegalStateException("Association with the name "+key+" is not found."); edList.add(createFromDeepMap(serviceName, (Map<String, Object>)valueMap, keys, associatedEntity, key)); entityDataBuilder.addAssociationElement(key, edList); }else{ entityDataBuilder.addElement(key,value);