### Question:
StackdriverWriter { public List<TimeSeries> registryToTimeSeries(Registry registry) { log.debug("Collecting metrics..."); ArrayList<TimeSeries> tsList = new ArrayList<TimeSeries>(); Iterator<Meter> iterator = registry.iterator(); while (iterator.hasNext()) { addMeterToTimeSeries(registry, iterator.next(), tsList); } return tsList; } @SuppressWarnings("PMD.BooleanInversion")  StackdriverWriter(ConfigParams configParams); MetricDescriptorCache getDescriptorCache(); TimeSeries measurementToTimeSeries(
      String descriptorType, Registry registry, Meter meter, Measurement measurement); List<TimeSeries> registryToTimeSeries(Registry registry); void writeRegistry(Registry registry); static final String WRITE_TIMER_NAME; }### Answer:
@Test public void writeRegistryWithTimer() throws IOException { DefaultRegistry testRegistry = new DefaultRegistry(clock); Timer timer = testRegistry.timer(idAXY); timer.record(123, TimeUnit.MILLISECONDS); List<TimeSeries> tsList = writer.registryToTimeSeries(testRegistry); Assert.assertEquals(2, tsList.size()); }