@Test void testCloseDatasetError() throws Exception { final Dataset mockDataset = mock(Dataset.class); doThrow(IOException.class).when(mockDataset).close(); assertThrows(TrellisRuntimeException.class, () -> DBUtils.closeDataset(mockDataset)); }
static void closeDataset(final Dataset dataset) { try { dataset.close(); } catch (final Exception ex) { throw new TrellisRuntimeException("Error closing dataset", ex); } }
DBUtils { static void closeDataset(final Dataset dataset) { try { dataset.close(); } catch (final Exception ex) { throw new TrellisRuntimeException("Error closing dataset", ex); } } }
DBUtils { static void closeDataset(final Dataset dataset) { try { dataset.close(); } catch (final Exception ex) { throw new TrellisRuntimeException("Error closing dataset", ex); } } private  DBUtils(); }
DBUtils { static void closeDataset(final Dataset dataset) { try { dataset.close(); } catch (final Exception ex) { throw new TrellisRuntimeException("Error closing dataset", ex); } } private  DBUtils();  }
DBUtils { static void closeDataset(final Dataset dataset) { try { dataset.close(); } catch (final Exception ex) { throw new TrellisRuntimeException("Error closing dataset", ex); } } private  DBUtils();   }