Useful sample code and test harnesses