Added 1 more unit test.  Refs #7789.
Fixed some bugs in cpp and unit test.  Refs #7789.