def METHOD_NAME(self):
    model = Model(count=37)
    filename = os.path.join(self.tmpdir, "nonexistent.pkl")
    self.assertFalse(os.path.exists(filename))
    with mock.patch.object(self.toolkit, "view_application"):
        with self.assertWarns(DeprecationWarning):
            model.configure_traits(filename=filename)
    self.assertTrue(os.path.exists(filename))
    with open(filename, "rb") as pickled_object:
        unpickled = pickle.load(pickled_object)
    self.assertIsInstance(unpickled, Model)
    self.assertEqual(unpickled.count, model.count)