Migrate some examples as tests.
Merge branch 'test_examples' into incoming