Added tests for stages
Add done() to promise train to catch errors in tests