Add utility methods and tests.