Add some code for better end-to-end testing.