@Test public void testExecuteAllValid() { result = getCurrentDateTime.execute("fr", "FR", "PST", null); assertEquals(SUCCESS, result.get(RETURN_CODE)); assertFalse(result.get(RETURN_RESULT).isEmpty()); }
@Action(name = "Get Current Date And Time", outputs = { @Output(RETURN_RESULT), @Output(RETURN_CODE), @Output(EXCEPTION) }, responses = { @Response(text = SUCCESS, field = RETURN_CODE, value = ReturnCodes.SUCCESS, matchType = COMPARE_EQUAL, responseType = RESOLVED), @Response(text = FAILURE, field = RETURN_CODE, value = ReturnCodes.FAILURE, matchType = COMPARE_EQUAL, responseType = ERROR, isOnFail = true)}) public Map<String, String> execute( @Param(LOCALE_LANG) String localeLang, @Param(LOCALE_COUNTRY) String localeCountry, @Param(TIMEZONE) String timezone, @Param(DATE_FORMAT) String dateFormat) { try { return OutputUtilities.getSuccessResultsMap(DateTimeService.getCurrentDateTime(localeLang, localeCountry, timezone, dateFormat)); } catch (Exception exception) { return OutputUtilities.getFailureResultsMap(exception); } }
GetCurrentDateTime { @Action(name = "Get Current Date And Time", outputs = { @Output(RETURN_RESULT), @Output(RETURN_CODE), @Output(EXCEPTION) }, responses = { @Response(text = SUCCESS, field = RETURN_CODE, value = ReturnCodes.SUCCESS, matchType = COMPARE_EQUAL, responseType = RESOLVED), @Response(text = FAILURE, field = RETURN_CODE, value = ReturnCodes.FAILURE, matchType = COMPARE_EQUAL, responseType = ERROR, isOnFail = true)}) public Map<String, String> execute( @Param(LOCALE_LANG) String localeLang, @Param(LOCALE_COUNTRY) String localeCountry, @Param(TIMEZONE) String timezone, @Param(DATE_FORMAT) String dateFormat) { try { return OutputUtilities.getSuccessResultsMap(DateTimeService.getCurrentDateTime(localeLang, localeCountry, timezone, dateFormat)); } catch (Exception exception) { return OutputUtilities.getFailureResultsMap(exception); } } }
GetCurrentDateTime { @Action(name = "Get Current Date And Time", outputs = { @Output(RETURN_RESULT), @Output(RETURN_CODE), @Output(EXCEPTION) }, responses = { @Response(text = SUCCESS, field = RETURN_CODE, value = ReturnCodes.SUCCESS, matchType = COMPARE_EQUAL, responseType = RESOLVED), @Response(text = FAILURE, field = RETURN_CODE, value = ReturnCodes.FAILURE, matchType = COMPARE_EQUAL, responseType = ERROR, isOnFail = true)}) public Map<String, String> execute( @Param(LOCALE_LANG) String localeLang, @Param(LOCALE_COUNTRY) String localeCountry, @Param(TIMEZONE) String timezone, @Param(DATE_FORMAT) String dateFormat) { try { return OutputUtilities.getSuccessResultsMap(DateTimeService.getCurrentDateTime(localeLang, localeCountry, timezone, dateFormat)); } catch (Exception exception) { return OutputUtilities.getFailureResultsMap(exception); } }  }
GetCurrentDateTime { @Action(name = "Get Current Date And Time", outputs = { @Output(RETURN_RESULT), @Output(RETURN_CODE), @Output(EXCEPTION) }, responses = { @Response(text = SUCCESS, field = RETURN_CODE, value = ReturnCodes.SUCCESS, matchType = COMPARE_EQUAL, responseType = RESOLVED), @Response(text = FAILURE, field = RETURN_CODE, value = ReturnCodes.FAILURE, matchType = COMPARE_EQUAL, responseType = ERROR, isOnFail = true)}) public Map<String, String> execute( @Param(LOCALE_LANG) String localeLang, @Param(LOCALE_COUNTRY) String localeCountry, @Param(TIMEZONE) String timezone, @Param(DATE_FORMAT) String dateFormat) { try { return OutputUtilities.getSuccessResultsMap(DateTimeService.getCurrentDateTime(localeLang, localeCountry, timezone, dateFormat)); } catch (Exception exception) { return OutputUtilities.getFailureResultsMap(exception); } }  @Action(name = "Get Current Date And Time", outputs = { @Output(RETURN_RESULT), @Output(RETURN_CODE), @Output(EXCEPTION) }, responses = { @Response(text = SUCCESS, field = RETURN_CODE, value = ReturnCodes.SUCCESS, matchType = COMPARE_EQUAL, responseType = RESOLVED), @Response(text = FAILURE, field = RETURN_CODE, value = ReturnCodes.FAILURE, matchType = COMPARE_EQUAL, responseType = ERROR, isOnFail = true)}) Map<String, String> execute(
            @Param(LOCALE_LANG) String localeLang,
            @Param(LOCALE_COUNTRY) String localeCountry,
            @Param(TIMEZONE) String timezone,
            @Param(DATE_FORMAT) String dateFormat); }
GetCurrentDateTime { @Action(name = "Get Current Date And Time", outputs = { @Output(RETURN_RESULT), @Output(RETURN_CODE), @Output(EXCEPTION) }, responses = { @Response(text = SUCCESS, field = RETURN_CODE, value = ReturnCodes.SUCCESS, matchType = COMPARE_EQUAL, responseType = RESOLVED), @Response(text = FAILURE, field = RETURN_CODE, value = ReturnCodes.FAILURE, matchType = COMPARE_EQUAL, responseType = ERROR, isOnFail = true)}) public Map<String, String> execute( @Param(LOCALE_LANG) String localeLang, @Param(LOCALE_COUNTRY) String localeCountry, @Param(TIMEZONE) String timezone, @Param(DATE_FORMAT) String dateFormat) { try { return OutputUtilities.getSuccessResultsMap(DateTimeService.getCurrentDateTime(localeLang, localeCountry, timezone, dateFormat)); } catch (Exception exception) { return OutputUtilities.getFailureResultsMap(exception); } }  @Action(name = "Get Current Date And Time", outputs = { @Output(RETURN_RESULT), @Output(RETURN_CODE), @Output(EXCEPTION) }, responses = { @Response(text = SUCCESS, field = RETURN_CODE, value = ReturnCodes.SUCCESS, matchType = COMPARE_EQUAL, responseType = RESOLVED), @Response(text = FAILURE, field = RETURN_CODE, value = ReturnCodes.FAILURE, matchType = COMPARE_EQUAL, responseType = ERROR, isOnFail = true)}) Map<String, String> execute(
            @Param(LOCALE_LANG) String localeLang,
            @Param(LOCALE_COUNTRY) String localeCountry,
            @Param(TIMEZONE) String timezone,
            @Param(DATE_FORMAT) String dateFormat);  }