def METHOD_NAME(self, mock_method, operator):
    mock_tensor = Mock()
    mock_method.return_value = mock_tensor
    x = keras_tensor.KerasTensor(shape=(3, 4), dtype="float32")
    result = operator(x)
    mock_method.assert_called_once_with(x)
    self.assertEqual(result, mock_tensor)