add unit/integrted tests for dpc

else should be aligned with if?