Selective policy enforcements for unit testing