#include <bits/stdc++.h>
using namespace std;
map<long long int, long long int> u;
vector<long long int> v;
int main() {
  long long int n, m, i, j, k, p, q, o, l, s, t;
  cin >> n;
  while (n--) {
    cin >> m;
    for (i = 0; i < m; i++) {
      cin >> o;
      v.push_back(o);
      u[o] = 1;
    }
    sort(v.begin(), v.end());
    for (i = 0, k = 0; i < m - 1; i++) {
      if (u[v[i]] == 1) {
        k++;
        s = i;
        for (j = i + 1; j < m; j++) {
          if (v[j] - v[s] != 1 && u[v[j]] == 1) {
            u[v[j]] = 0;
            s = j;
          }
        }
      }
    }
    if (u[v[m - 1]] == 1) {
      k++;
    }
    cout << k << endl;
    v.clear();
    u.clear();
  }
  return 0;
}
