public static MongoIndexRange create(ObjectId id,
                                         String indexName,
                                         DateTime begin,
                                         DateTime end,
                                         DateTime calculatedAt,
                                         int calculationDuration,
                                         List<String> streamIds) {
        return new AutoValue_MongoIndexRange(id, indexName, begin, end, calculatedAt, calculationDuration, streamIds);
    }
@Test
    public void testCreate() throws Exception {
        String indexName = "test";
        DateTime begin = new DateTime(2015, 1, 1, 0, 0, DateTimeZone.UTC);
        DateTime end = new DateTime(2015, 2, 1, 0, 0, DateTimeZone.UTC);
        DateTime calculatedAt = new DateTime(2015, 2, 1, 0, 0, DateTimeZone.UTC);
        int calculationDuration = 42;
        MongoIndexRange indexRange = MongoIndexRange.create(indexName, begin, end, calculatedAt, calculationDuration);

        assertThat(indexRange.indexName()).isEqualTo(indexName);
        assertThat(indexRange.begin()).isEqualTo(begin);
        assertThat(indexRange.end()).isEqualTo(end);
        assertThat(indexRange.calculatedAt()).isEqualTo(calculatedAt);
        assertThat(indexRange.calculationDuration()).isEqualTo(calculationDuration);
    }