Refactored tests to provide templating (no copy-pasta)