move mock to tests/unit/mock/
detach mock function redirection
test write operation of Fd