private Object queryOpportunity(
     Map<String, Object> opportunity, InterceptingChainLifecycleWrapper queryOpportunityFlow)
     throws MuleException, Exception {
   return queryOpportunityFlow
       .process(getTestEvent(opportunity, MessageExchangePattern.REQUEST_RESPONSE))
       .getMessage()
       .getPayload();
 }
  private String createTestOpportunitiesInSfdcSandbox(
      Map<String, Object> opportunity, InterceptingChainLifecycleWrapper createOpportunityFlow)
      throws MuleException, Exception {
    List<Map<String, Object>> salesforceOpportunities = new ArrayList<Map<String, Object>>();
    salesforceOpportunities.add(opportunity);

    final List<SaveResult> payloadAfterExecution =
        (List<SaveResult>)
            createOpportunityFlow
                .process(
                    getTestEvent(salesforceOpportunities, MessageExchangePattern.REQUEST_RESPONSE))
                .getMessage()
                .getPayload();
    return payloadAfterExecution.get(0).getId();
  }