add unit test for cp