Add convenience class method and test.