share client code in copy unittests