@Override
    public int deletePermanently(UUID id) {
        try (final Connection conn = dataSource.getConnection(); final Transaction transaction = new Transaction(conn)) {
            final int amountDeleted = jobTable(conn).deletePermanently(id);
            transaction.commit();
            notifyJobStatsOnChangeListenersIf(amountDeleted > 0);
            return amountDeleted;
        } catch (SQLException e) {
            throw new StorageException(e);
        }
    }
@Test
    void deletePermanently_WhenSqlExceptionOccursAJobStorageExceptionIsThrown() throws SQLException {
        doThrow(new SQLException("Boem")).when(preparedStatement).executeUpdate();

        assertThatThrownBy(() -> jobStorageProvider.deletePermanently(randomUUID())).isInstanceOf(StorageException.class);
    }