@Test
public void testCloseStream() throws IOException {

    when(is.markSupported()).thenReturn(true);
    InputStream is2 = mock(InputStream.class);
    KeepOpenInputStream keepOpenInputStream = new KeepOpenInputStream(is);
    verify(is).markSupported();
    KeepOpenInputStream.closeStream(is2);
    verify(is2).close();
    KeepOpenInputStream.closeStream(keepOpenInputStream);
    verify(is).close();
    verifyNoMoreInteractions(is, is2);
}