message: Add test case for duplicate correlation_ids
diff: @@ -62,6 +62,7 @@ using ::application_manager::request_controller::RequestInfo;
  using ::testing::Return;
  using ::testing::ReturnRef;
  using ::testing::NiceMock;
  +using ::testing::_;
  typedef NiceMock<application_manager_test::MockRequest> MRequest;
  typedef utils::SharedPtr<MRequest> RequestPtr;
  @@ -114,6 +115,7 @@ class RequestControllerTestClass : public ::testing::Test {
  RequestPtr output =
  utils::MakeShared<MRequest>(connection_key, correlation_id);
  ON_CALL(*output, default_timeout()).WillByDefault(Return(default_timeout));
  + ON_CALL(*output, CheckPermissions()).WillByDefault(Return(true));
  return output;
  }
  @@ -158,6 +160,40 @@ class RequestControllerTestClass : public ::testing::Test {
  const TestSettings default_settings_;
  };
  +TEST_F(RequestControllerTestClass,
  + AddMobileRequest_DuplicateCorrelationId_INVALID_ID) {
  + RequestPtr request_valid = GetMockRequest();
  + TestAsyncWaiter waiter_valid;
  + ON_CALL(*request_valid, default_timeout()).WillByDefault(Return(0));
  + EXPECT_CALL(*request_valid, Init()).WillOnce(Return(true));
  + EXPECT_CALL(*request_valid, Run())
  + .Times(1)
  + .WillRepeatedly(NotifyTestAsyncWaiter(&waiter_valid));
  +
  + EXPECT_EQ(RequestController::SUCCESS,
  + AddRequest(default_settings_,
  + request_valid,
  + RequestInfo::RequestType::MobileRequest,
  + mobile_apis::HMILevel::HMI_NONE));
  + EXPECT_TRUE(waiter_valid.WaitFor(1, 1000));
  +
  + // The command should not be run if another command with the same
  + // correlation_id is waiting for a response
  + RequestPtr request_dup_corr_id = GetMockRequest();
  + TestAsyncWaiter waiter_dup;
  + ON_CALL(*request_dup_corr_id, default_timeout()).WillByDefault(Return(0));
  + EXPECT_CALL(*request_dup_corr_id, Init()).WillOnce(Return(true));
  + ON_CALL(*request_dup_corr_id, Run())
  + .WillByDefault(NotifyTestAsyncWaiter(&waiter_dup));
  +
  + EXPECT_EQ(RequestController::SUCCESS,
  + AddRequest(default_settings_,
  + request_dup_corr_id,
  + RequestInfo::RequestType::MobileRequest,
  + mobile_apis::HMILevel::HMI_NONE));
  + EXPECT_FALSE(waiter_dup.WaitFor(1, 1000));
  +}
  +
  TEST_F(RequestControllerTestClass,
  CheckPosibilitytoAdd_ZeroValueLimiters_SUCCESS) {
  // Test case than pending_requests_amount,
  