Fixed unit test method

Fixed WriteThenRead method.