why have separate check on `longKey`? It seems like the check on `testKeys` already covers it.