### Question:
AtlasCounter extends AtlasMeter implements Counter { @Override public void add(double amount) { if (Double.isFinite(amount) && amount > 0.0) { value.getCurrent().addAndGet(amount); updateLastModTime(); } } AtlasCounter(Registry registry, Id id, Clock clock, long ttl, long step); @Override void add(double amount); @Override double actualCount();  }### Answer:
@Test public void addAmount() { counter.add(42.1); clock.setWallTime(step + 1); checkValue(42.1); }
@Test public void addNegativeAmount() { counter.add(-42.0); clock.setWallTime(step + 1); checkValue(0.0); }
@Test public void addNaN() { counter.add(1.0); counter.add(Double.NaN); clock.setWallTime(step + 1); checkValue(1.0); }
@Test public void addInfinity() { counter.add(Double.POSITIVE_INFINITY); clock.setWallTime(step + 1); checkValue(0.0); }