@Test
public void test() throws Exception {

    try (InputStream stream = KairosDbFormatParserTest.class.getResourceAsStream("/kairosdb.json")) {
        assertNotNull(stream);
        List<MetricTimeSeries> series = Lists.newArrayList(sut.parse(stream));
        // We should have two metrics
        assertThat(series.size(), is(2));
        MetricTimeSeries first = series.get(0);
        assertThat(first.getName(), is("archive.file.tracked"));
        assertThat(first.getTimestamps().size(), is(1));
        assertThat(first.getValues().get(0), is(123.0));
        assertThat(first.getTimestamps().get(0), is(1349109376L));
        assertThat(first.getAttributesReference().get("host"), is("test"));
        MetricTimeSeries second = series.get(1);
        assertThat(second.getName(), is("archive.file.search"));
        assertThat(second.getTimestamps().size(), is(1));
        assertThat(second.getValues().get(0), is(32.1));
        assertThat(second.getTimestamps().get(0), is(1349109665L));
        assertThat(second.getAttributesReference().get("host"), is("test"));
    }
}