Add test case and adjust build rules