Added unit tests to verify the utility methods.