Adding tests for rebalance

please review these files and provide feedback