As a note, I think it's often ok to have code duplication in tests — it's more important that a test is easily readable in isolation than for it to be DRY. (There's clearly a fine line here, but I think for this particular case, given how much of the boilerplate is about unpacking the arguments, I'd recommend just inlining the code.)