Unit test for the Rebuild call.