fdo#74077: Write unit test for this.

Change-Id: Ieacad6dc1909ed5647d8a6f4839c9e9d47cb655c