Use groups function in test