Add bucket-transform-handler's test and refactor