@SuppressWarnings("static-access") @Test public void testCallSpecimenServiceDate() { CrsImportUtil crsImportUtil = ReflectionUtil.newInstance(CrsImportUtil.class, new Object[] {}); Date fromDate = java.sql.Date.valueOf("2017-11-25"); Date untilDate = java.sql.Date.valueOf("2016-11-27"); byte[] result = crsImportUtil.callSpecimenService(fromDate, untilDate); assertNotNull("01",result); assertTrue("02",result instanceof byte[]); }
static byte[] callSpecimenService(Date fromDate, Date untilDate) { String url = config.required("crs.specimens.url.initial"); if (fromDate != null) url += "&from=" + oaiDateFormatter.format(fromDate); if (untilDate != null) url += "&until=" + oaiDateFormatter.format(untilDate); return callService(url); }
CrsImportUtil { static byte[] callSpecimenService(Date fromDate, Date untilDate) { String url = config.required("crs.specimens.url.initial"); if (fromDate != null) url += "&from=" + oaiDateFormatter.format(fromDate); if (untilDate != null) url += "&until=" + oaiDateFormatter.format(untilDate); return callService(url); } }
CrsImportUtil { static byte[] callSpecimenService(Date fromDate, Date untilDate) { String url = config.required("crs.specimens.url.initial"); if (fromDate != null) url += "&from=" + oaiDateFormatter.format(fromDate); if (untilDate != null) url += "&until=" + oaiDateFormatter.format(untilDate); return callService(url); } private  CrsImportUtil(); }
CrsImportUtil { static byte[] callSpecimenService(Date fromDate, Date untilDate) { String url = config.required("crs.specimens.url.initial"); if (fromDate != null) url += "&from=" + oaiDateFormatter.format(fromDate); if (untilDate != null) url += "&until=" + oaiDateFormatter.format(untilDate); return callService(url); } private  CrsImportUtil();  }
CrsImportUtil { static byte[] callSpecimenService(Date fromDate, Date untilDate) { String url = config.required("crs.specimens.url.initial"); if (fromDate != null) url += "&from=" + oaiDateFormatter.format(fromDate); if (untilDate != null) url += "&until=" + oaiDateFormatter.format(untilDate); return callService(url); } private  CrsImportUtil();   }