Add setProperty(), getProperty() and invokeMethod() test helper methods and use them in tests.