'Assert that L{banana.Banana.sendEncoded} raises L{banana.BananaError}
if called with the given object.
@param obj: Some object that Banana does not support.
@param name: The name of the type of the object.
@raise: The failure exception is raised if L{Banana.sendEncoded} does
not raise L{banana.BananaError} or if the message associated with the
exception is not formatted to include the type of the unsupported
object.'

def _unsupportedTypeTest(self, obj, name):

    exc = self.assertRaises(banana.BananaError, self.enc.sendEncoded, obj)
    self.assertIn('Banana    cannot    send    {0}    objects'.format(name), str(exc))
