@Test
public void testGetQueries() throws Exception {

    GoogleMonitoringIngester ingester = new GoogleMonitoringIngester(conf);
    QueryConf queryConf = ingester.getQueries(conf.getString(GoogleMonitoringIngester.GOOGLE_MONITORING_QUERIES));
    assertEquals(1, queryConf.getQueries().size());
    QueryConf.Query query = queryConf.getQueries().get(0);
    assertEquals("some-project", query.getProject());
    assertEquals("metric.type=\"custom.googleapis.com/test\"", query.getFilter());
    assertEquals("300s", query.getAlignmentPeriod());
    assertEquals("ALIGN_MEAN", query.getPerSeriesAligner());
    assertEquals("REDUCE_MEAN", query.getCrossSeriesReducer());
    assertArrayEquals(Lists.newArrayList("foo", "project").toArray(),
                      query.getGroupByFields().toArray());
}