### Question:
DoubleLastValueAggregator extends AbstractAggregator { public static AggregatorFactory getFactory() { return AGGREGATOR_FACTORY; }  static AggregatorFactory getFactory(); @Override @Nullable Point toPoint(long startEpochNanos, long epochNanos, Labels labels); @Override void doRecordDouble(double value);  }### Answer:
@Test void factoryAggregation() { AggregatorFactory factory = DoubleLastValueAggregator.getFactory(); assertThat(factory.getAggregator()).isInstanceOf(DoubleLastValueAggregator.class); }
@Test void multipleRecords() { Aggregator aggregator = DoubleLastValueAggregator.getFactory().getAggregator(); aggregator.recordDouble(12.1); assertThat(getPoint(aggregator).getValue()).isCloseTo(12.1, offset(1e-6)); aggregator.recordDouble(13.1); aggregator.recordDouble(14.1); assertThat(getPoint(aggregator).getValue()).isCloseTo(14.1, offset(1e-6)); }
@Test void mergeAndReset() { Aggregator aggregator = DoubleLastValueAggregator.getFactory().getAggregator(); aggregator.recordDouble(13.1); assertThat(getPoint(aggregator).getValue()).isCloseTo(13.1, offset(1e-6)); Aggregator mergedAggregator = DoubleLastValueAggregator.getFactory().getAggregator(); aggregator.mergeToAndReset(mergedAggregator); assertNullPoint(aggregator); assertThat(getPoint(mergedAggregator).getValue()).isCloseTo(13.1, offset(1e-6)); aggregator.recordDouble(12.1); aggregator.mergeToAndReset(mergedAggregator); assertNullPoint(aggregator); assertThat(getPoint(mergedAggregator).getValue()).isCloseTo(12.1, offset(1e-6)); }