What is the difference between abstraction and encapsulation, and how do you apply them in test automation?