@@ -207,14 +207,6 @@ private void readFile(final BOMInputStream bomInputStream) throws Exception {
207207 } while (bytes > 0 );
208208 }
209209
210- @ Test
211- public void testAvailableWithBOMAfterOpen () throws Exception {
212- final byte [] data = { 'A' , 'B' , 'C' , 'D' };
213- try (InputStream in = BOMInputStream .builder ().setInputStream (createUtf8Input (data , true )).get ()) {
214- assertEquals (7 , in .available ());
215- }
216- }
217-
218210 @ Test
219211 public void testAvailableWithBOMAfterClose () throws Exception {
220212 final byte [] data = { 'A' , 'B' , 'C' , 'D' };
@@ -227,14 +219,11 @@ public void testAvailableWithBOMAfterClose() throws Exception {
227219 }
228220
229221 @ Test
230- public void testReadAfterClose () throws Exception {
222+ public void testAvailableWithBOMAfterOpen () throws Exception {
231223 final byte [] data = { 'A' , 'B' , 'C' , 'D' };
232- final InputStream shadow ;
233224 try (InputStream in = BOMInputStream .builder ().setInputStream (createUtf8Input (data , true )).get ()) {
234225 assertEquals (7 , in .available ());
235- shadow = in ;
236226 }
237- assertEquals (IOUtils .EOF , shadow .read ());
238227 }
239228
240229 @ Test
@@ -437,6 +426,17 @@ public void testNoBoms() throws Exception {
437426 .close ());
438427 }
439428
429+ @ Test
430+ public void testReadAfterClose () throws Exception {
431+ final byte [] data = { 'A' , 'B' , 'C' , 'D' };
432+ final InputStream shadow ;
433+ try (InputStream in = BOMInputStream .builder ().setInputStream (createUtf8Input (data , true )).get ()) {
434+ assertEquals (7 , in .available ());
435+ shadow = in ;
436+ }
437+ assertEquals (IOUtils .EOF , shadow .read ());
438+ }
439+
440440 @ Test
441441 public void testReadEmpty () throws Exception {
442442 final byte [] data = {};
0 commit comments