/** Test generate summary file csv. */
 @Test
 public void testGenerateSummaryFileCSV() {
   // Success situation
   InquiryLightRequest inquiryLightRequest = createInquiryLightRequest(createUserContext());
   inquiryLightRequest.setProcessId(new Integer(1));
   InquiryLightResponse response =
       getSmartPointAccessorBCL().generateSummaryFileCSV(inquiryLightRequest);
   assertNotNull(response);
   assertNotNull(response.getFileName());
   assertTrue(response.isOperationSuccess());
 }
  /** Test generate light history file csv. */
  @Test
  public void testGenerateLightHistoryFileCSV() {

    // Success situation
    InquiryLightRequest inquiryLightRequest = createInquiryLightRequest(createUserContext());
    inquiryLightRequest.setProcessId(new Integer(1));
    inquiryLightRequest.setFileName(FILE_NAME + LCDateUtil.getNewDateUTC().getTime() + ".csv");
    InquiryLightResponse response =
        getSmartPointAccessorBCL().generateLightHistoryFileCSV(inquiryLightRequest);
    assertNotNull(response);
    assertNotNull(response.getFileName());
    assertTrue(response.isOperationSuccess());

    // Errors situations
    // ISmartPointDAC
    setSituation(
        getSmartPointAccessorBCL(),
        SituationsEnum.ERROR,
        ISmartPointDAC.class,
        "generateLightHistoryFileCSV");
    response = getSmartPointAccessorBCL().generateLightHistoryFileCSV(inquiryLightRequest);
    assertFalse(response.isOperationSuccess());
    assertMessages(response, ERROR_CODE);
    resetMocksToSmartPointArea();

    // IProcessBCL
    // Return operation success because is set at implementation
    setSituation(
        getSmartPointAccessorBCL(), SituationsEnum.ERROR, IProcessBCL.class, FETCH_PROCESS_BY_ID);
    response = getSmartPointAccessorBCL().generateLightHistoryFileCSV(inquiryLightRequest);
    assertNotNull(response);
    assertFalse(response.isOperationSuccess());
    assertNull(response.getFileName());
    resetMocksToSmartPointArea();

    setSituation(
        getSmartPointAccessorBCL(), SituationsEnum.ERROR, IProcessBCL.class, UPDATE_PROCESS);
    response = getSmartPointAccessorBCL().generateLightHistoryFileCSV(inquiryLightRequest);
    assertNotNull(response);
    assertFalse(response.isOperationSuccess());
    assertNull(response.getFileName());
    resetMocksToSmartPointArea();
  }