chore(engine/test): adjust test to be jdk8 compatible

- adjust Javascript test to work on JDK 6/7 and JDK8. Previous
javascript engine shipped with JDK 6/7 (Rhino) outputs double value
with .0. JDK 8 javascript engine (Nashorn) outputs 1+2 as Integer with
value 3.

related to CAM-2105