Tip: Don't mix output into input, consider what happens here if for some unforseen reason, somebody adds a test param which exactly matches a result key?  This could cause unpredictable behaviour and be a very tricky bug to find.