MetricFinder metricFinder = mock(MetricFinder.class);
when(metricFinder.findAll()).thenReturn(Arrays.<Metric>asList(CoreMetrics.LINES, CoreMetrics.COVERAGE, CoreMetrics.COVERAGE_LINE_HITS_DATA));
TendencyDecorator decorator = new TendencyDecorator(null, metricFinder);
TimeMachineQuery query = decorator.initQuery(project);
assertThat(query.getMetrics().size(), is(2));
assertThat(query.getMetrics(), JUnitMatchers.<Metric>hasItems(CoreMetrics.LINES, CoreMetrics.COVERAGE));
assertThat(query.getFrom(), is(date("2009-11-25")));
assertThat(query.isToCurrentAnalysis(), is(true));
}