def METHOD_NAME(self, mock_check_call):
    mock_check_call.side_effect = OSError(errno.ENOENT, 'some error')
    start_session_params = {
        "Target": "i-123456789"
    }
    start_session_response = {
        "SessionId": "session-id",
        "TokenValue": "token-value",
        "StreamUrl": "stream-url"
    }
    terminate_session_params = {
        "SessionId": "session-id"
    }
    self.client.start_session.return_value = start_session_response
    with self.assertRaises(ValueError):
        self.caller.invoke('ssm', 'StartSession',
                           start_session_params, mock.Mock())
        self.client.start_session.assert_called_with(
            **start_session_params)
        self.client.terminate_session.assert_called_with(
            **terminate_session_params)
        mock_check_call_list = mock_check_call.call_args[0][0]
        mock_check_call_list[1] = json.loads(mock_check_call_list[1])
        self.assertEqual(
            mock_check_call_list,
            ['session-manager-plugin',
             start_session_response,
             self.region,
             'StartSession',
             self.profile,
             json.dumps(start_session_params),
             self.endpoint_url]
        )