public void initQuery() throws ParseException {
Project project = mock(Project.class);
when(project.getAnalysisDate()).thenReturn(date("2009-12-25"));
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));