### Question:
IQEntityTimeHandler extends IQHandler implements ServerFeaturesProvider { String getUtcDate(Date date) { Calendar calendar = new GregorianCalendar(TimeZone.getTimeZone("GMT")); calendar.setTime(date); return DatatypeConverter.printDateTime(calendar); } IQEntityTimeHandler(); @Override IQ handleIQ(IQ packet); @Override IQHandlerInfo getInfo(); @Override Iterator<String> getFeatures();  }### Answer:
@Test public void testUtcDate() { IQEntityTimeHandler iqEntityTimeHandler = new IQEntityTimeHandler(); Date date = new Date(); Calendar calendar = new GregorianCalendar(); calendar.setTime(date); calendar.setTimeZone(TimeZone.getTimeZone("GMT")); assertEquals(iqEntityTimeHandler.getUtcDate(date), DatatypeConverter.printDateTime(calendar)); }