Add singleton macro and test for it.