    def add_test(self, test: Union[MFT, INV, DIR]):
        """
        Adds a fully specified checklist test to the suite.
        The tests can be of the following types:

        * MFT: A minimum functionality test. It checks if the predicted output
               matches the expected output.
               For example, for a sentiment analysis task, a simple MFT can check
               if the model always predicts a positive sentiment for very
               positive words.
               The test's data contains the input and the expected output.

        * INV: An invariance test. It checks if the predicted output is invariant
               to some change in the input.
               For example, for a sentiment analysis task, an INV test can check
               if the prediction stays consistent if simple typos are added.
               The test's data contains the pairs (input, modified input).

        * DIR: A directional expectation test. It checks if the predicted output
               changes in some specific way in response to the change in input.
               For example, for a sentiment analysis task, a DIR test can check if
               adding a reducer (eg. "good" -> "somewhat good") causes the
               prediction's positive confidence score to decrease (or at least not
               increase).
               The test's data contains single inputs or pairs (input, modified input).

        Please refer to [the paper](https://api.semanticscholar.org/CorpusID:218551201)
        for more details and examples.

        Note: `test` needs to be fully specified; with name, capability and description.
        """
        if test.data:  # test data should contain at least one example.
            self.suite.add(test)
        else:
            logger.warning("'{}' was not added, as it contains no examples.".format(test.name))
Adds a fully specified checklist test to the suite.
The tests can be of the following types:

* MFT: A minimum functionality test. It checks if the predicted output
matches the expected output.
For example, for a sentiment analysis task, a simple MFT can check
if the model always predicts a positive sentiment for very
positive words.
The test's data contains the input and the expected output.

* INV: An invariance test. It checks if the predicted output is invariant
to some change in the input.
For example, for a sentiment analysis task, an INV test can check
if the prediction stays consistent if simple typos are added.
The test's data contains the pairs (input, modified input).

* DIR: A directional expectation test. It checks if the predicted output
changes in some specific way in response to the change in input.
For example, for a sentiment analysis task, a DIR test can check if
adding a reducer (eg. "good" -> "somewhat good") causes the
prediction's positive confidence score to decrease (or at least not
increase).
The test's data contains single inputs or pairs (input, modified input).

Please refer to [the paper](https://api.semanticscholar.org/CorpusID:218551201)
for more details and examples.

Note: `test` needs to be fully specified; with name, capability and description.
allennlp/confidence_checks/task_checklists/task_suite.py