@Test public void testCloseQuietlyOutput() throws Exception { Mockito.doThrow(new IOException()).when(output).close(); try { TypeHandlerUtils.closeQuietly(output); } catch (Exception ex) { fail(); } }