Wrote tests and setup logic