Test multistage pipeline

With generator, stage1, stage2 and stage3.

See #45.