add unit/integrted tests for dpc

You can do this in the `if` block to skip the copy if no mutation is going to be done.