'L{_ErrorFormatter.formatError} should return the return value of
C{formatMessage} if it is supplied.'

def test_formatMessage(self):

    formatCalls = []
    def formatMessage(errorCode):
        formatCalls.append(errorCode)
        return self.probeMessage
    formatter = _ErrorFormatter(None, formatMessage, {self.probeErrorCode: 'wrong    message'})
    message = formatter.formatError(self.probeErrorCode)
    self.assertEqual(message, self.probeMessage)
    self.assertEqual(formatCalls, [self.probeErrorCode])
