Refactored JSR286 portlet test.

Change-Id: I1830ebca5e23890636ade0bab2eca2cefe6ee1ac