added test and fixed bug in future
Merge pull request #107 from wajam/fx-fix-future

Added test and fixed bug in future when onSuccess was called after the future was completed.