Fixed queue size in test. Added unit tests for target leader change.