Fixed log and unit test. Refs #7789.