What are the key differences between object-oriented programming concepts in Java and how do you apply them to test automation?