added a test which returns a rejecting Promise in the /foobar before callback