There is a basic practice in test driven development. Red, Green, Refactor. Red: start writing a test until it fails Green: write the solution up until the test doesn’t fail Refactor: refactor the code to keep it clean Bob Martin explained three rules for TDD Write production code only to…