### Question:
Evaluator { public EvalPayload eval(long timestamp) { List<EvalPayload.Metric> metrics = new ArrayList<>(); subscriptions.values().forEach(subEntry -> { long step = subEntry.subscription.getFrequency(); if (timestamp % step == 0) { LOGGER.debug("evaluating subscription: {}: {}", timestamp, subEntry.subscription); DataExpr expr = subEntry.subscription.dataExpr(); DataExpr.Aggregator aggregator = expr.aggregator(expr.query().exactTags(), false); Iterator<Map.Entry<Id, Consolidator>> it = subEntry.measurements.entrySet().iterator(); while (it.hasNext()) { Map.Entry<Id, Consolidator> entry = it.next(); Consolidator consolidator = entry.getValue(); consolidator.update(timestamp, Double.NaN); double v = consolidator.value(timestamp); if (!Double.isNaN(v)) { Map<String, String> tags = idMapper.apply(entry.getKey()); tags.putAll(commonTags); TagsValuePair p = new TagsValuePair(tags, v); aggregator.update(p); LOGGER.trace("aggregating: {}: {}", timestamp, p); } if (consolidator.isEmpty()) { it.remove(); } } String subId = subEntry.subscription.getId(); for (TagsValuePair pair : aggregator.result()) { LOGGER.trace("result: {}: {}", timestamp, pair); metrics.add(new EvalPayload.Metric(subId, pair.tags(), pair.value())); } } }); return new EvalPayload(timestamp, metrics); } Evaluator(Map<String, String> commonTags, Function<Id, Map<String, String>> idMapper, long step); synchronized void sync(List<Subscription> subs); void update(Measurement m); void update(Id id, long t, double v); EvalPayload eval(long timestamp); EvalPayload eval(long t, List<Measurement> ms);  }### Answer:
@Test public void noSubsForGroup() { Evaluator evaluator = newEvaluator(); EvalPayload payload = evaluator.eval(0L); EvalPayload expected = new EvalPayload(0L, Collections.emptyList()); Assertions.assertEquals(expected, payload); }