/** @since 0.8 or earlier */ @Test public void testAddComplexNumbersWithMethod() throws Exception { String id = complexAddWithMethod(); if (id == null) { return; } PolyglotEngine.Value apply = findGlobalSymbol(id); ComplexNumber a = new ComplexNumber(32, 10); ComplexNumber b = new ComplexNumber(10, 32); apply.execute(a, b); assertDouble("The same value returned", 42.0, a.get(ComplexNumber.REAL_IDENTIFIER)); assertDouble("The same value returned", 42.0, a.get(ComplexNumber.IMAGINARY_IDENTIFIER)); }