TODO test and implement

For a while I have used the following template for auto-generated method stubs in Eclipse:

int todoTestAndImplement;
throw new UnsupportedOperationException("TODO test and implement");

The first line makes sure the stub is shown on the problems tab, making it more difficult to forget than items on the tasks tab.

The second line relies on the courage TDD gives. A runtime exception is really what I want before the new method is really done.

Originally published on 2008-12-02 at under category Java