Update README and add test cases for the README examples.