updated the sample's test code