Utility for unit testing of constructor invariance