Function creating a mock based on a passed in pipe for test
github.com/ike18t/mock_pipe
ike18t/mock_pipe