GRPCExporter extends MetricFormatter implements MetricValuesExportService, IConsumer<ExportData> { @Override public void onError(List<ExportData> data, Throwable t) { LOGGER.error(t.getMessage(), t); } GRPCExporter(GRPCExporterSetting setting); @Override void export(ExportEvent event); void initSubscriptionList(); @Override void init(); @Override void consume(List<ExportData> data); @Override void onError(List<ExportData> data, Throwable t); @Override void onExit();  }
@Test public void onError() { Exception e = new IllegalArgumentException("some something wrong"); exporter.onError(Collections.emptyList(), e); exporter.onError(dataList(), e); }