### Question:
LongLastValueAggregator extends AbstractAggregator { public static AggregatorFactory getFactory() { return AGGREGATOR_FACTORY; }  static AggregatorFactory getFactory(); @Override @Nullable Point toPoint(long startEpochNanos, long epochNanos, Labels labels); @Override void doRecordLong(long value);  }### Answer:
@Test void factoryAggregation() { AggregatorFactory factory = LongLastValueAggregator.getFactory(); assertThat(factory.getAggregator()).isInstanceOf(LongLastValueAggregator.class); }
@Test void multipleRecords() { Aggregator aggregator = LongLastValueAggregator.getFactory().getAggregator(); aggregator.recordLong(12); assertThat(getPoint(aggregator).getValue()).isEqualTo(12); aggregator.recordLong(13); aggregator.recordLong(14); assertThat(getPoint(aggregator).getValue()).isEqualTo(14); }
@Test void mergeAndReset() { Aggregator aggregator = LongLastValueAggregator.getFactory().getAggregator(); aggregator.recordLong(13); assertThat(getPoint(aggregator).getValue()).isEqualTo(13); Aggregator mergedAggregator = LongLastValueAggregator.getFactory().getAggregator(); aggregator.mergeToAndReset(mergedAggregator); assertNullPoint(aggregator); assertThat(getPoint(mergedAggregator).getValue()).isEqualTo(13); aggregator.recordLong(12); aggregator.mergeToAndReset(mergedAggregator); assertNullPoint(aggregator); assertThat(getPoint(mergedAggregator).getValue()).isEqualTo(12); }