'When local file already exists it can be overwritten using the
L{DccFileReceive.set_overwrite} method.'

def test_setOverwrite(self):

    fp = FilePath(self.mktemp())
    fp.setContent('I    love    contributing    to    Twisted!')
    protocol = self.makeConnectedDccFileReceive(fp.path, overwrite=True)
    self.allDataReceivedForProtocol(protocol, 'Twisted    rocks!')
    self.assertEqual(fp.getContent(), 'Twisted    rocks!')
