def METHOD_NAME(self, mock_time, mock_createOutputDirectory, mock_createTargetName,
                                   mock_createSourceName):
    mock_createSourceName.return_value = "sourcePFN"
    mock_createTargetName.return_value = "targetPFN"
    mock_createOutputDirectory.side_effect = [StageOutError("error"), StageOutError("error"),
                                              StageOutError("Last error")]
    with self.assertRaises(Exception) as context:
        self.StageOutImpl("protocol", "inputPFN", "targetPFN")
        self.assertTrue('Last error' in context.exception)
    mock_createSourceName.assert_called_with("protocol", "inputPFN")
    mock_createTargetName.assert_called_with("protocol", "targetPFN")
    mock_createOutputDirectory.assert_called_with("targetPFN")
    calls = [call(600), call(600)]
    mock_time.sleep.assert_has_calls(calls)