Test-driven development workflow for writing tests before implementation - red-green-refactor cycle with deterministic unit tests