Changed test code to work with arbitrary data.