RUBY-643 fix style issue and add test