Move sample code into tests