@Test public void countTwo() { this.data.set(new Metric<Integer>("foo", 1)); this.data.set(new Metric<Integer>("bar", 1)); this.exporter.export(); assertThat(this.reader.count()).isEqualTo(2); RichGauge one = this.reader.findOne("foo"); assertThat(one).isNotNull(); assertThat(one.getCount()).isEqualTo(1); }
@Test public void countOne() { this.data.set(new Metric<Integer>("foo", 1)); this.data.set(new Metric<Integer>("foo", 1)); this.exporter.export(); // Check the exporter worked assertThat(this.repository.count()).isEqualTo(6); assertThat(this.reader.count()).isEqualTo(1); RichGauge one = this.reader.findOne("foo"); assertThat(one).isNotNull(); assertThat(one.getCount()).isEqualTo(2); }