JUnit has been around for a long time. And Junit has been in NetBeans for sometime now. If I remember correctly, I did play with integrated JUnit in NetBeans a year or two ago. Now I am trying it out again and it certainly is pretty easy to use. I just click my way through creating generic tests case and execute them. NetBeans just take care of the rest and let me focus on the actual test logic. I find it a very good way for me to document my assumptions while I write code. This also allows me to test a small feature at a time and helps me to build confidence that my code actually works while I am developing it. This incremental approach certainly is a good way to write code.