tests to ensure httpurlconnection #geterrorstream is called when 400 is returned . concode_field_sep OutputStream mOutputStreamMock concode_elem_sep HttpURLConnection mHttpConMock concode_elem_sep ExpectedException mThrown concode_field_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 concode_elem_sep void testConstructor
void function ( ) { when ( mHttpConMock . getResponseCode ( ) ) . thenReturn ( 400 ) ; SwiftOutputStream loc0 = new SwiftOutputStream ( mHttpConMock ) ; loc0 . close ( ) ; verify ( mHttpConMock ) . getErrorStream ( ) ; verify ( mHttpConMock ) . disconnect ( ) ; }