LPS-50685 add tests

Hey @samuelkong can you please review this? 
It's the same as https://github.com/samuelkong/liferay-portal-ee/pull/14
Thx!

cc/ @adolfopa