def METHOD_NAME(self, d, constraint_coefs, f, substitute_var, x1, x2):
    self.assertEqual(len(d.component_map(Constraint)), 2)
    # just indicator_var
    self.assertEqual(len(d.component_map(Var)), 1)
    for i, cons in d.simplex_halfspaces.items():
        coefs = constraint_coefs[i]
        assertExpressionsEqual(
            self, cons.expr, coefs[0] * x1 + coefs[1] * x2 + coefs[2] <= 0, places=6
        )
    self.assertIsInstance(d.set_substitute, Constraint)
    assertExpressionsEqual(
        self, d.set_substitute.expr, substitute_var == f(x1, x2), places=7
    )