Hardware unit test

@icbat Here's that metaclassing I told you about. :) Lemme know what you think.