throw new IllegalStateException("Only expecting one NV pair ... actual size is " + nvPairs.size());
} else if (nvPairs.size() == 0) {
throw new IllegalStateException("No expected result data passed");
}
NameValuePair nvPair = nvPairs.get(0);
//Class<?> returnType = bean.getInjectorBean().getReturnType();
//If actual object is null, cannot determine was to reflect expected object to
//So return unreflected object.
if (actualObject == null) {
return nvPair.getValue();
}
Class<?> returnType = actualObject.getClass();
Object propertyValue = Reflect.getWrappedValue(returnType, nvPair.getValue());
return propertyValue;
}