Refactored test dispenser.