String line = readStringValue();
String[] lineTokens = splitBySpace(line);
service.setLocationSpread(Integer.parseInt(lineTokens[0]));
int serviceDependencyListSize = Integer.parseInt(lineTokens[1]);
for (int j = 0; j < serviceDependencyListSize; j++) {
MrServiceDependency serviceDependency = new MrServiceDependency();
serviceDependency.setId(serviceDependencyId);
serviceDependency.setFromService(service);
int toServiceIndex = Integer.parseInt(lineTokens[2 + j]);
if (toServiceIndex >= serviceList.size()) {
throw new IllegalArgumentException("Service with id (" + serviceId
+ ") has a non existing toServiceIndex (" + toServiceIndex + ").");
}
MrService toService = serviceList.get(toServiceIndex);
serviceDependency.setToService(toService);
serviceDependencyList.add(serviceDependency);
serviceDependencyId++;
}
int numberOfTokens = 2 + serviceDependencyListSize;
if (lineTokens.length != numberOfTokens) {