extract Test class out into stdlib, TODO - refactor