TaggedInputStream extends ProxyInputStream { @Override protected void handleIOException(IOException e) throws IOException { throw new TaggedIOException(e, tag); } TaggedInputStream(InputStream proxy); static TaggedInputStream get(InputStream proxy); boolean isCauseOf(IOException exception); void throwIfCauseOf(Exception exception); String toString();  }
@Test public void createdIOExceptionIsSerializable() { try { new TaggedInputStream(null).handleIOException(new IOException("Dummy")); } catch (IOException e) { assertCanSerialize(e); } }