bnc#885548: Write test for this.

Change-Id: Ifbd4502a5e49dfbb60301b935291ed0ce65da706