Factor some code
Merge pull request #6 from jubianchi/newTestedInstanceWithVariadic

Factor some code to avoid code duplication, thanks to @jubianchi.