Test unit for generators JSON encoding