Modified expect to be directly imported.
Tested error case on fromString