tests to ensure ioexception is thrown if httpurlconnection #getoutputstream throws anioexception . concode_field_sep OutputStream mOutputStreamMock concode_elem_sep HttpURLConnection mHttpConMock concode_elem_sep ExpectedException mThrown concode_field_sep void testCloseError concode_elem_sep void testCloseSuccess concode_elem_sep void before concode_elem_sep void testFlush concode_elem_sep void testWrite3 concode_elem_sep void testWrite1 concode_elem_sep void testWrite2