Update the example that uses 'runGetState' to new API.

Fixes #30.