private long getLastInsertId(final Collection<UpdateResult> updateResults, final Collection<Comparable<?>> autoIncrementGeneratedValues) {
        List<Long> lastInsertIds = new ArrayList<>(updateResults.size() + autoIncrementGeneratedValues.size());
        for (UpdateResult each : updateResults) {
            if (each.getLastInsertId() > 0L) {
                lastInsertIds.add(each.getLastInsertId());
            }
        }
        for (Comparable<?> each : autoIncrementGeneratedValues) {
            if (each instanceof Number) {
                lastInsertIds.add(((Number) each).longValue());
            }
        }
        return lastInsertIds.isEmpty() ? 0L : getMinLastInsertId(lastInsertIds);
    }
@Test
    void assertGetLastInsertIdWhenExecuteResultIsNotEmpty() {
        UpdateResponseHeader actual = new UpdateResponseHeader(mock(SQLStatement.class), createExecuteUpdateResults());
        assertThat(actual.getLastInsertId(), is(2L));
    }