@Test public void testIncreaseCount() { actuatorMetricService.increaseCount(200); actuatorMetricService.increaseCount(200); actuatorMetricService.increaseCount(404); verify(actuatorMetricService, times(3)).increaseCount(anyInt()); }
@Override public void increaseCount(final int status) { String counterName = "counter.status." + status; registry.counter(counterName).increment(1); if (!statusList.contains(counterName)) { statusList.add(counterName); } }
CustomActuatorMetricServiceImpl implements CustomActuatorMetricService { @Override public void increaseCount(final int status) { String counterName = "counter.status." + status; registry.counter(counterName).increment(1); if (!statusList.contains(counterName)) { statusList.add(counterName); } } }
CustomActuatorMetricServiceImpl implements CustomActuatorMetricService { @Override public void increaseCount(final int status) { String counterName = "counter.status." + status; registry.counter(counterName).increment(1); if (!statusList.contains(counterName)) { statusList.add(counterName); } } CustomActuatorMetricServiceImpl(); }
CustomActuatorMetricServiceImpl implements CustomActuatorMetricService { @Override public void increaseCount(final int status) { String counterName = "counter.status." + status; registry.counter(counterName).increment(1); if (!statusList.contains(counterName)) { statusList.add(counterName); } } CustomActuatorMetricServiceImpl(); @Override void increaseCount(final int status); @Generated @Scheduled(fixedDelay = 60000) void exportMetrics(); }
CustomActuatorMetricServiceImpl implements CustomActuatorMetricService { @Override public void increaseCount(final int status) { String counterName = "counter.status." + status; registry.counter(counterName).increment(1); if (!statusList.contains(counterName)) { statusList.add(counterName); } } CustomActuatorMetricServiceImpl(); @Override void increaseCount(final int status); @Generated @Scheduled(fixedDelay = 60000) void exportMetrics();  }