GoogleLatitudeUpdater extends AbstractUpdater implements FileUploadSupport { @Override public int importFile(final ApiKey apiKey, final File f) throws Exception { try { ZipFile zipFile = new ZipFile(f); final Enumeration<? extends ZipEntry> entries = zipFile.entries(); while (entries.hasMoreElements()) { final ZipEntry zipEntry = entries.nextElement(); if (zipEntry.isDirectory()) continue; if (zipEntry.getName().endsWith("LocationHistory.json")) return parseLocations(apiKey, zipFile.getInputStream(zipEntry)); } throw new RuntimeException("Couldn't find LocationHistory.json in the uploaded zip file"); } catch (Exception e) { notificationsService.addNamedNotification(apiKey.getGuestId(), Notification.Type.WARNING, connector().statusNotificationName(), "Failed to import Google Latitude zip file, error is:<br>" + e.getMessage()); throw (e); } } GoogleLatitudeUpdater(); @Override void updateConnectorDataHistory(UpdateInfo updateInfo); void updateConnectorData(UpdateInfo updateInfo); @Override void setDefaultChannelStyles(ApiKey apiKey); @Override int importFile(final ApiKey apiKey, final File f);  }
@Test public void testImportFile() throws Exception { }