Wrote code for testing and writing tests to file.