Update the Rebin Code for passing unit tests

The unit test was based on the old version of the Documentation.

It should solve the unit tests failures.

re #6485