I am writing a bunch of unit tests for a program. One of the function writes to a certain file descriptor then closes the file descriptor. I am trying to think of a best w