Add some methods for stoppng and restarting broker during tests.