Take home tests that are difficult enough for the questions to not be easily answered on Stack Exchange or paid sites. This is fairly easy to do in upper-division undergraduate courses as well as graduate courses. Not so easy for lower-division courses. The closest I've seen for a lower-division class was a professor who made as much of the exam content based off examples from lecture material, but I always saw that as a way to punish students who ditched lectures.