@Test(expected = RuntimeException.class) public void test_should_throw_run_time_exception_when_date_format_is_not_as_expected() { final HashMap<String, Object> serviceRequest = new HashMap<>(); final HashMap<String, Object> sevaRequestMap = new HashMap<>(); TimeZone.setDefault(TimeZone.getTimeZone(IST)); serviceRequest.put("requestedDatetime", "26/03/2017 12:58:40"); sevaRequestMap.put("serviceRequest", serviceRequest); final SevaRequest sevaRequest = new SevaRequest(sevaRequestMap); sevaRequest.getFormattedCreatedDate(); }
public String getFormattedCreatedDate() { return new SimpleDateFormat(DATE_FORMAT).format(getCreatedDate()); }
SevaRequest { public String getFormattedCreatedDate() { return new SimpleDateFormat(DATE_FORMAT).format(getCreatedDate()); } }
SevaRequest { public String getFormattedCreatedDate() { return new SimpleDateFormat(DATE_FORMAT).format(getCreatedDate()); } @SuppressWarnings("unchecked")  SevaRequest(HashMap<String, Object> sevaRequestMap); }
SevaRequest { public String getFormattedCreatedDate() { return new SimpleDateFormat(DATE_FORMAT).format(getCreatedDate()); } @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 getFormattedCreatedDate() { return new SimpleDateFormat(DATE_FORMAT).format(getCreatedDate()); } @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();  }