def METHOD_NAME(self):
    """Check ObjectList framework"""
    wall = espressomd.shapes.Wall(normal=[-1, 0, 0])
    constraint = espressomd.constraints.ShapeBasedConstraint(shape=wall)
    constraints = espressomd.constraints.Constraints()
    self.assertEqual(len(constraints), 0)
    constraints.add(constraint)
    self.assertEqual(len(constraints), 1)
    with self.assertRaisesRegex(RuntimeError, "This object is already present in the list"):
        constraints.add(constraint)
    self.assertEqual(len(constraints), 1)
    constraints.remove(constraint)
    self.assertEqual(len(constraints), 0)
    with self.assertRaisesRegex(RuntimeError, "This object is absent from the list"):
        constraints.remove(constraint)