Don't make tests convert to and from bytes. Instead, just use a StreamResult double...