Added tests and methods for payload class