Added some JUnit Tests for TDD. Fixed generation issues

Single Threaded Generation definitely works now I have the JUnits to
prove it.