CMS-3351 Write tests for server side javascript. Added some test wrappers in java.