Add unit test for dm helper.