Fixed bugs in logic to calculate ticks using groove.
Added test cases for groove calculation.
Implemented parameter check in Groove#resolve.