added first chaining testcase and helpers for it