Amend tests and add testem support