def METHOD_NAME(self):
    gradient = self.create_gradient()
    self.set_stops(gradient)
    with self.assertTraitChanges(gradient, "updated", count=1):
        gradient.stops = [
            ColorStop(offset=0.0, color='blue'),
            ColorStop(offset=1.0, color='lime'),
        ]