Add javadoc and cleanup debug code in generator tests.