@Test public void test_should_fail_while_passing_empty_list_of_rejection_letter() { final HashMap<String, Object> sevaRequestMap = new HashMap<>(); final HashMap<String, Object> serviceRequest = new HashMap<>(); final ArrayList<HashMap<String, String>> attributeValues = new ArrayList<>(); final HashMap<String, String> rejection = new HashMap<>(); rejection.put("key", null); rejection.put("name", "rejectionLetter"); attributeValues.add(rejection); serviceRequest.put("attribValues", attributeValues); sevaRequestMap.put("serviceRequest", serviceRequest); final SevaRequest sevaRequest = new SevaRequest(sevaRequestMap); assertNull(sevaRequest.getLatestRejectionLetter()); }
public String getLatestRejectionLetter() { final List<String> rejectionLetters = getDynamicMultiValue(REJECTION_LETTER); if (CollectionUtils.isEmpty(rejectionLetters)) { return null; } return rejectionLetters.get(rejectionLetters.size() - 1); }
SevaRequest { public String getLatestRejectionLetter() { final List<String> rejectionLetters = getDynamicMultiValue(REJECTION_LETTER); if (CollectionUtils.isEmpty(rejectionLetters)) { return null; } return rejectionLetters.get(rejectionLetters.size() - 1); } }
SevaRequest { public String getLatestRejectionLetter() { final List<String> rejectionLetters = getDynamicMultiValue(REJECTION_LETTER); if (CollectionUtils.isEmpty(rejectionLetters)) { return null; } return rejectionLetters.get(rejectionLetters.size() - 1); } @SuppressWarnings("unchecked")  SevaRequest(HashMap<String, Object> sevaRequestMap); }
SevaRequest { public String getLatestRejectionLetter() { final List<String> rejectionLetters = getDynamicMultiValue(REJECTION_LETTER); if (CollectionUtils.isEmpty(rejectionLetters)) { return null; } return rejectionLetters.get(rejectionLetters.size() - 1); } @SuppressWarnings("unchecked")  SevaRequest(HashMap<String, Object> sevaRequestMap); String getMobileNumber(); String getRequesterEmail(); boolean isRequesterEmailAbsent(); String getServiceTypeName(); String getServiceTypeCode(); String getTenantId(); String getCrn(); String getStatusName(); String getDetails(); String getLocationName(); String getRequesterName(); String getFormattedCreatedDate(); boolean isCreate(); boolean isUpdate(); String getProcessingFee(); boolean isProcessingFeePresent(); boolean isInProgress(); boolean isRejected(); boolean isResubmited(); String getLatestRejectionLetter(); @SuppressWarnings("unchecked") boolean isEmployeeLoggedIn(); Long getPositionId(); boolean isEscalated(); Long getPreviousAssignee(); String getLocationId(); }
SevaRequest { public String getLatestRejectionLetter() { final List<String> rejectionLetters = getDynamicMultiValue(REJECTION_LETTER); if (CollectionUtils.isEmpty(rejectionLetters)) { return null; } return rejectionLetters.get(rejectionLetters.size() - 1); } @SuppressWarnings("unchecked")  SevaRequest(HashMap<String, Object> sevaRequestMap); String getMobileNumber(); String getRequesterEmail(); boolean isRequesterEmailAbsent(); String getServiceTypeName(); String getServiceTypeCode(); String getTenantId(); String getCrn(); String getStatusName(); String getDetails(); String getLocationName(); String getRequesterName(); String getFormattedCreatedDate(); boolean isCreate(); boolean isUpdate(); String getProcessingFee(); boolean isProcessingFeePresent(); boolean isInProgress(); boolean isRejected(); boolean isResubmited(); String getLatestRejectionLetter(); @SuppressWarnings("unchecked") boolean isEmployeeLoggedIn(); Long getPositionId(); boolean isEscalated(); Long getPreviousAssignee(); String getLocationId();  }