def METHOD_NAME(self):
    """
    Ensures that mcrouter do not dump invalid configs.
    """
    # first, copy valid config to a temp file, as we need to modify it later
    base_dir = BaseDirectory('McConfigs')
    config_path = self._get_valid_config(base_dir)
    # create mcrouter with a valid config (mcrouter will dump it to disk).
    mcrouter = self.get_mcrouter(config_path)
    self.assertTrue(self._is_mcrouter_running(mcrouter))
    # replace config file with an invalid one.
    # Mcrouter should not dump config this time, because it's invalid.
    self._replace_with_invalid_config(config_path)
    # shutdown mcrouter
    mcrouter.shutdown()
    mcrouter.terminate()
    # check if the last config dumped is the valid config.
    dumped_config_root = self._get_dumped_config_root()
    dumped_config_files = os.listdir(dumped_config_root)
    self.assertEqual(1, len(dumped_config_files))
    dumped_config_file = '{}/{}'.format(
        dumped_config_root, dumped_config_files[0])
    with open(self.valid_config) as original_file:
        with open(dumped_config_file) as dumped_file:
            self.assertEqual(original_file.read(), dumped_file.read())