make re-usable process executor and corresponding unit tests