Refactored test for being generic.