'L{SynchronousTestCase.failureResultOf} raises
L{SynchronousTestCase.failureException} when called with a L{Deferred}
with a failure type that was not expected, and the
L{SynchronousTestCase.failureException} message contains the original
failure traceback as well as the expected failure type'

def test_failureResultOfWithWrongFailureOneExpectedFailure(self):

    try:
        self.failureResultOf(fail(self.failure), KeyError)
    except self.failureException as e:
        self.assertIn(self.failure.getTraceback(), str(e))
        self.assertIn('Failure    of    type    ({0}.{1})    expected    on'.format(KeyError.__module__, KeyError.__name__), str(e))
