Tests for examples. fixed #39