I disagree. This is a regression test for a bug reported from a customer. (In the text, a tester noticed the bug, though the developer said it was a from a customer.)<p>This sort of thing is also part of customer relations. It will lead to bad PR if the same bug pops up again. You want to be able to tell your customer that you've fixed the bug, and put tests in place to keep it from happening again.<p>That it happens to help debugging and TDD is secondary.<p>Also, I believe there's a bug in this code:<p><pre><code> for (int n = 2; n * n &lt; number; n++) {
</code></pre>
Even with the comparison the right way, there will be a silent overflow when n*n exceeds maxint.