Implement some tests based on python end-to-end tests.