public static String jsToString( Object value, String classType ) {
    if ( classType.equalsIgnoreCase( JS_NATIVE_JAVA_OBJ )
      || classType.equalsIgnoreCase( JS_UNDEFINED ) ) {
      // Is it a java Value class ?
      try {
        Value v = (Value) Context.jsToJava( value, Value.class );
        return v.toString();
      } catch ( Exception ev ) {
        // convert to a string should work in most cases...
        //
        return Context.toString( value );
      }
    } else {
      // A String perhaps?
      return Context.toString( value );
    }
  }
@Test
  public void jsToString_NativeJavaObject_Int() throws Exception {
    assertEquals( "1", JavaScriptUtils.jsToString( getIntValue(), JAVA_OBJECT ).trim() );
  }