maybe mock the .read() and cover the rest?