add unit/integrted tests for dpc

Interesting, sorry for being inconsistent.  Using minimize directly does not preclude changing it later.  I suspect that those other methods are not going to take this exact signature (like having the function hard-coded at the c-level) so keeping this function does not help much in the long run and is harmful in the short run.