Program program = createAndParse(str);
FunctionDeclaration functionDeclaration = (FunctionDeclaration) program
.statements().get(0);
IFunctionBinding functionBinding = functionDeclaration
.resolveFunctionBinding();
Assert.assertNotNull(functionBinding);
Assert.assertTrue(functionBinding.getName().equals("foo"));
ITypeBinding[] returnTypes = functionBinding.getReturnType();
Assert.assertTrue(returnTypes[0].getName().equals("SoapClient"));
}