def METHOD_NAME(self, load_collection, legal_constraint):
    simulator_class, rod = load_collection
    simulator_class.constrain(rod).using(legal_constraint)
    simulator_class.finalize()
    # After finalize check if the created constrain object is instance of the class we have given.
    assert isinstance(simulator_class._constraints[-1][-1], legal_constraint)
    # TODO: this is a dummy test for constrain values and rates find a better way to test them
    simulator_class.constrain_values(time=0)
    simulator_class.constrain_rates(time=0)