Add method to get the variable assignments from a matching including corresponding tests