Fixing broken read:id

In addition:
* extracting String value generation into its own function
* adding two unit tests for read...