Add unittest for #46.