SpiritQueryServiceImpl implements SpiritQueryService { protected String trasferDateType(Date date) { String pattern = "yyyyMMdd"; SimpleDateFormat format = new SimpleDateFormat(pattern); return (format.format(date)); } SpiritQueryServiceImpl(SpiritAdapter spiritAdapter); @Override PatientDto addPatient(PixPatientDto pixPatientDto); @Override PatientProfileDto updatePatient(PatientProfileDto patientProfileDto);  }
@Test public void testTrasferDateType() { @SuppressWarnings("deprecation") Date date = new Date("Fri May 09 16:07:46 EDT 2014"); assertEquals("20140509", sqt.trasferDateType(date)); }