Tests for next database id.