allContainedObjectsTheSame = false;
break;
}
}
StepMetaData stepMetaData = expMetaData.getMetaDataAtIndex(0);
if ((actualHashMap.size()!=0) && (allContainedObjectsTheSame)) {
DataTypeEnum type = ObjectUtil.resolveType(currentClass);
switch(type) {
case JAVA_DOT_LANG_OBJECT:
case STRING:
for (int i = 0; i < stepMetaData.size(); i++) {
Object castedExpectedObj = Reflect.getWrappedValue(currentClass, stepMetaData.getValueAtIndex(i));
expectedResultsMap.put(stepMetaData.getNameAtIndex(i),castedExpectedObj);
}
break;
default:
//If a complex object have to assume it is already casted as we cannot do it here
for (int i = 0; i < stepMetaData.size(); i++) {
expectedResultsMap.put(stepMetaData.getNameAtIndex(i), stepMetaData.getValueAtIndex(i));
}
break;
}
} else {
for (int i = 0; i < stepMetaData.size(); i++) {
expectedResultsMap.put(stepMetaData.getNameAtIndex(i), stepMetaData.getValueAtIndex(i));
}
}
}
return expectedResultsMap;