### Question:
JavaScriptUtils { public static String jsToString( Object value, String classType ) { 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 ) ); }
@Test public void jsToString_NativeJavaObject_Double() throws Exception { assertEquals( "1", JavaScriptUtils.jsToString( getDoubleValue(), JAVA_OBJECT ) ); Scriptable value = Context.toObject( new Double( 1.23 ), scope ); assertEquals( "1.23", JavaScriptUtils.jsToString( value, JAVA_OBJECT ) ); }
@Test public void jsToString_String() throws Exception { assertEquals( "qwerty", JavaScriptUtils.jsToString( "qwerty", String.class.getName() ) ); }