### Question:
JavaScriptUtils { public static String jsToString( Object value, String classType ) { if ( classType.equalsIgnoreCase( "org.mozilla.javascript.NativeJavaObject" ) || classType.equalsIgnoreCase( "org.mozilla.javascript.Undefined" ) ) { try { Value v = (Value) Context.jsToJava( value, Value.class ); return v.toString(); } catch ( Exception ev ) { return Context.toString( value ); } } else { return Context.toString( value ); } }  static Object convertFromJs( Object value, int type, String fieldName ); static Number jsToNumber( Object value, String classType ); static Long jsToInteger( Object value, Class<?> clazz ); static String jsToString( Object value, String classType ); static Date jsToDate( Object value, String classType ); static BigDecimal jsToBigNumber( Object value, String classType );  }### Answer:
@Test public void jsToString_Undefined() throws Exception { assertEquals( "null", JavaScriptUtils.jsToString( null, UNDEFINED ) ); }
@Test public void jsToString_NativeJavaObject_Int() throws Exception { assertEquals( "1", JavaScriptUtils.jsToString( getIntValue(), JAVA_OBJECT ).trim() ); }
@Test public void jsToString_NativeJavaObject_Double() throws Exception { assertEquals( "1.0", JavaScriptUtils.jsToString( getDoubleValue(), JAVA_OBJECT ).trim() ); }
@Test public void jsToString_String() throws Exception { assertEquals( "qwerty", JavaScriptUtils.jsToString( "qwerty", String.class.getName() ) ); }