### Question:
Closer { Closer() { throw new UnsupportedOperationException(); } Closer(); static void close(Reader reader); static void close(Writer writer); static void close(InputStream inputStream); static void close(OutputStream outputStream); static void close(Socket socket);  }### Answer:
@Test public void testCloser() throws Exception { Closer.close((Socket)null); final Socket socket = new Socket() { public synchronized void close() throws IOException { TestCloser.this.close(); } }; Closer.close(socket); m_ioexception[0] = new IOException(); Closer.close(socket); m_ioexception[0] = new InterruptedIOException(); try { Closer.close(socket); fail("Expected UncheckedInterruptedException"); } catch (UncheckedInterruptedException e) { assertSame(m_ioexception[0], e.getCause()); } }