### Question:
MonitoringESDao { public Map<String, Double> loadMetrics(final ELKUsageMetric metric, final Collection<String> resourceIds, final LocalDateTime from, final LocalDateTime to) { if (CollectionUtils.isEmpty(resourceIds)) { return Collections.emptyMap(); } return AbstractMetricRequester.getRequester(metric, client).performRequest(resourceIds, from, to); } @Autowired  MonitoringESDao(RestHighLevelClient client, RestClient lowLevelClient); Map<String, Double> loadMetrics(final ELKUsageMetric metric, final Collection<String> resourceIds,
                                           final LocalDateTime from, final LocalDateTime to); void deleteIndices(final int retentionPeriodDays); Optional<LocalDateTime> oldestIndexDate();  }### Answer:
@Test public void testLoadCpuUsageRateMetrics() { Map<String, Double> stats = monitoringESDao.loadMetrics(ELKUsageMetric.CPU, Arrays.asList(NODE1_NAME, NODE2_NAME), NOW.minusMinutes(HALF_AN_HOUR), NOW); Assert.assertEquals(2, stats.size()); Assert.assertEquals(3, stats.get(NODE1_NAME), TEST_DELTA); Assert.assertEquals(3, stats.get(NODE2_NAME), TEST_DELTA); }