Added a unit test. Refs #8655.