More to the point, youcouldeasilyinject a mockobjectinsteadof a realSpeakerimplementation, andyou could do a testwithoutaffecting the restofyour codebase.
Last year, Dutch chip-maker NXP released a new type of mobile audio component -- the TFA9887 -- that allowed a mobile device to monitor its speaker system in real-time in order to max out volume without risking damage to the driver.