add unit/integrted tests for dpc

You mean we should stop the program by raising the exception?