@Test public void testHandleRequestNonNumericId(){ GetIVRConfigRequest request = new GetIVRConfigRequest(); request.setUserid("NaN"); ResponseType expectedResponse = new ResponseType(); expectedResponse.setErrorCode(ErrorCodeType.MOTECH_INVALID_USER_ID); expectedResponse.setStatus(StatusType.ERROR); ResponseType actualResponse = intellivrBean.handleRequest(request); assertEquals(expectedResponse.getErrorCode(), actualResponse.getErrorCode()); assertEquals(expectedResponse.getStatus(), actualResponse.getStatus()); }
@Transactional public ResponseType handleRequest(GetIVRConfigRequest request) { return handleRequest(request, UUID.randomUUID().toString()); }
IntellIVRBean implements GatewayManager, GetIVRConfigRequestHandler, IVRCallRequester, IVRCallSessionProcessor, IVRCallStatsProvider, ReportHandler { @Transactional public ResponseType handleRequest(GetIVRConfigRequest request) { return handleRequest(request, UUID.randomUUID().toString()); } }
IntellIVRBean implements GatewayManager, GetIVRConfigRequestHandler, IVRCallRequester, IVRCallSessionProcessor, IVRCallStatsProvider, ReportHandler { @Transactional public ResponseType handleRequest(GetIVRConfigRequest request) { return handleRequest(request, UUID.randomUUID().toString()); }  }
IntellIVRBean implements GatewayManager, GetIVRConfigRequestHandler, IVRCallRequester, IVRCallSessionProcessor, IVRCallStatsProvider, ReportHandler { @Transactional public ResponseType handleRequest(GetIVRConfigRequest request) { return handleRequest(request, UUID.randomUUID().toString()); }  @Transactional void init(); void cleanUp(); String getMessageStatus(GatewayResponse response); MStatus mapMessageStatus(GatewayResponse response); @Transactional Set<GatewayResponse> sendMessage(GatewayRequest gatewayRequest); @Transactional void processOpenSessions(); @Transactional void processWaitingSessions(); @Transactional void requestCall(IVRCallSession session, String externalId); RequestType createIVRRequest(IVRCallSession session, String externalId); @Transactional ResponseType handleRequest(GetIVRConfigRequest request); @SuppressWarnings("unchecked") @Transactional ResponseType handleRequest(GetIVRConfigRequest request, String externalId); @Transactional ResponseType handleReport(ReportType report); @Transactional int getCountIVRCallSessions(); @Transactional int getCountIVRSessionsInLastMinutes(int minutes); @Transactional int getCountIVRCallSessionsInLastHours(int hours); @Transactional int getCountIVRCallSessionsInLastDays(int days); @Transactional int getCountIVRCalls(); @Transactional int getCountIVRCallsInLastMinutes(int minutes); @Transactional int getCountIVRCallsInLastHours(int hours); @Transactional int getCountIVRCallsInLastDays(int days); @Transactional int getCountIVRCallsWithStatus(IVRCallStatus status); @Transactional int getCountIVRCallsInLastMinutesWithStatus(int minutes, IVRCallStatus status); @Transactional int getCountIVRCallsInLastHoursWithStatus(int hours, IVRCallStatus status); @Transactional int getCountIVRCallsInLastDaysWithStatus(int days, IVRCallStatus status); @Transactional List<IVRRecordingStat> getIVRRecordingStats(); @Transactional List<IVRCallStatusStat> getIVRCallStatusStats(); @Transactional List<IVRCallStatusStat> getIVRCallStatusStatsFromLastMinutes(int minutes); @Transactional List<IVRCallStatusStat> getIVRCallStatusStatsFromLastHours(int hours); @Transactional List<IVRCallStatusStat> getIVRCallStatusStatsFromLastDays(int days); @Transactional List<IVRCallSession> getIVRCallSessions(); @Transactional List<IVRCallSession> getIVRCallSessionsInLastMinutes(int minutes); @Transactional List<IVRCallSession> getIVRCallSessionsInLastHours(int hours); @Transactional List<IVRCallSession> getIVRCallSessionsInLastDays(int days); @Transactional List<IVRCallSession> getIVRCallSessionsForUser(String user); @Transactional List<IVRCallSession> getIVRCallSessionsForPhone(String phone); void setMessageHandler(GatewayMessageHandler messageHandler); GatewayMessageHandler getMessageHandler(); String getReportURL(); void setReportURL(String reportURL); String getApiID(); void setApiID(String apiID); IntellIVRServer getIvrServer(); void setIvrServer(IntellIVRServer ivrServer); String getMethod(); void setMethod(String method); String getDefaultLanguage(); void setDefaultLanguage(String defaultLanguage); String getDefaultTree(); void setDefaultTree(String defaultTree); String getDefaultReminder(); void setDefaultReminder(String defaultReminder); MessageStatusStore getStatusStore(); void setStatusStore(MessageStatusStore statusStore); long getBundlingDelay(); void setBundlingDelay(long bundlingDelay); int getRetryDelay(); void setRetryDelay(int retryDelay); int getMaxAttempts(); void setMaxAttempts(int maxAttempts); int getMaxDays(); void setMaxDays(int maxDays); int getAvailableDays(); void setAvailableDays(int availableDays); int getCallCompletedThreshold(); void setCallCompletedThreshold(int callCompletedThreshold); int getPreReminderDelay(); void setPreReminderDelay(int preReminderDelay); boolean isAccelerateRetries(); void setAccelerateRetries(boolean accelerateRetries); String getNoPendingMessagesRecordingName(); void setNoPendingMessagesRecordingName(
            String noPendingMessagesRecordingName); String getWelcomeMessageRecordingName(); void setWelcomeMessageRecordingName(String welcomeMessageRecordingName); Resource getMappingResource(); void setMappingResource(Resource mappingsFile); CoreManager getCoreManager(); void setCoreManager(CoreManager coreManager); RegistrarService getRegistrarService(); void setRegistrarService(RegistrarService registrarService); IVRDAO getIvrDao(); void setIvrDao(IVRDAO ivrDao); IVRCallRequester getIvrCallRequester(); void setIvrCallRequester(IVRCallRequester ivrCallRequester); }
IntellIVRBean implements GatewayManager, GetIVRConfigRequestHandler, IVRCallRequester, IVRCallSessionProcessor, IVRCallStatsProvider, ReportHandler { @Transactional public ResponseType handleRequest(GetIVRConfigRequest request) { return handleRequest(request, UUID.randomUUID().toString()); }  @Transactional void init(); void cleanUp(); String getMessageStatus(GatewayResponse response); MStatus mapMessageStatus(GatewayResponse response); @Transactional Set<GatewayResponse> sendMessage(GatewayRequest gatewayRequest); @Transactional void processOpenSessions(); @Transactional void processWaitingSessions(); @Transactional void requestCall(IVRCallSession session, String externalId); RequestType createIVRRequest(IVRCallSession session, String externalId); @Transactional ResponseType handleRequest(GetIVRConfigRequest request); @SuppressWarnings("unchecked") @Transactional ResponseType handleRequest(GetIVRConfigRequest request, String externalId); @Transactional ResponseType handleReport(ReportType report); @Transactional int getCountIVRCallSessions(); @Transactional int getCountIVRSessionsInLastMinutes(int minutes); @Transactional int getCountIVRCallSessionsInLastHours(int hours); @Transactional int getCountIVRCallSessionsInLastDays(int days); @Transactional int getCountIVRCalls(); @Transactional int getCountIVRCallsInLastMinutes(int minutes); @Transactional int getCountIVRCallsInLastHours(int hours); @Transactional int getCountIVRCallsInLastDays(int days); @Transactional int getCountIVRCallsWithStatus(IVRCallStatus status); @Transactional int getCountIVRCallsInLastMinutesWithStatus(int minutes, IVRCallStatus status); @Transactional int getCountIVRCallsInLastHoursWithStatus(int hours, IVRCallStatus status); @Transactional int getCountIVRCallsInLastDaysWithStatus(int days, IVRCallStatus status); @Transactional List<IVRRecordingStat> getIVRRecordingStats(); @Transactional List<IVRCallStatusStat> getIVRCallStatusStats(); @Transactional List<IVRCallStatusStat> getIVRCallStatusStatsFromLastMinutes(int minutes); @Transactional List<IVRCallStatusStat> getIVRCallStatusStatsFromLastHours(int hours); @Transactional List<IVRCallStatusStat> getIVRCallStatusStatsFromLastDays(int days); @Transactional List<IVRCallSession> getIVRCallSessions(); @Transactional List<IVRCallSession> getIVRCallSessionsInLastMinutes(int minutes); @Transactional List<IVRCallSession> getIVRCallSessionsInLastHours(int hours); @Transactional List<IVRCallSession> getIVRCallSessionsInLastDays(int days); @Transactional List<IVRCallSession> getIVRCallSessionsForUser(String user); @Transactional List<IVRCallSession> getIVRCallSessionsForPhone(String phone); void setMessageHandler(GatewayMessageHandler messageHandler); GatewayMessageHandler getMessageHandler(); String getReportURL(); void setReportURL(String reportURL); String getApiID(); void setApiID(String apiID); IntellIVRServer getIvrServer(); void setIvrServer(IntellIVRServer ivrServer); String getMethod(); void setMethod(String method); String getDefaultLanguage(); void setDefaultLanguage(String defaultLanguage); String getDefaultTree(); void setDefaultTree(String defaultTree); String getDefaultReminder(); void setDefaultReminder(String defaultReminder); MessageStatusStore getStatusStore(); void setStatusStore(MessageStatusStore statusStore); long getBundlingDelay(); void setBundlingDelay(long bundlingDelay); int getRetryDelay(); void setRetryDelay(int retryDelay); int getMaxAttempts(); void setMaxAttempts(int maxAttempts); int getMaxDays(); void setMaxDays(int maxDays); int getAvailableDays(); void setAvailableDays(int availableDays); int getCallCompletedThreshold(); void setCallCompletedThreshold(int callCompletedThreshold); int getPreReminderDelay(); void setPreReminderDelay(int preReminderDelay); boolean isAccelerateRetries(); void setAccelerateRetries(boolean accelerateRetries); String getNoPendingMessagesRecordingName(); void setNoPendingMessagesRecordingName(
            String noPendingMessagesRecordingName); String getWelcomeMessageRecordingName(); void setWelcomeMessageRecordingName(String welcomeMessageRecordingName); Resource getMappingResource(); void setMappingResource(Resource mappingsFile); CoreManager getCoreManager(); void setCoreManager(CoreManager coreManager); RegistrarService getRegistrarService(); void setRegistrarService(RegistrarService registrarService); IVRDAO getIvrDao(); void setIvrDao(IVRDAO ivrDao); IVRCallRequester getIvrCallRequester(); void setIvrCallRequester(IVRCallRequester ivrCallRequester);  }