Testing water lines

When looking at purchasing a new property and you want to make sure the water lines don’t have any issues, how best do you go about testing this?