Add test code from kde-runtime