Added tests for Detach[WithException]Primitive.