Fix ETag method and add tests