Tests and mock implementation for open and close

Works but fails once in a while with memory access errors.
Add receive data test
Add mock method and tests for FT_Write/device.write