add unit test for as-stream-by-mime-type