### Question:
ElasticsearchHttpReporter extends ElasticsearchReporter { public static Builder forRegistryAndIndexPrefix(MetricRegistry registry, String elasticsearchIndexPrefix) { return new Builder(registry, elasticsearchIndexPrefix); } protected  ElasticsearchHttpReporter(MetricRegistry registry, Clock clock,
            String elasticsearchIndexPrefix, String timestampFieldName,
            String metricPrefix, TimeUnit rateUnit, TimeUnit durationUnit,
            MetricFilter filter, int timeout, int bulkRequestLimit,
            String... elasticsearchHosts); static Builder forRegistryAndIndexPrefix(MetricRegistry registry,
            String elasticsearchIndexPrefix);  }### Answer:
@Test public void testReportsWithAlternateTimestampField() { reporter.stop(); reporter = ElasticsearchHttpReporter .forRegistryAndIndexPrefix(registry, "test") .withTimestampFieldName("@timeywimey") .withClock(Clock.defaultClock()).prefixedWith(prefix) .convertRatesTo(TimeUnit.SECONDS) .convertDurationsTo(TimeUnit.MILLISECONDS) .withBulkRequestLimit(10).filter(MetricFilter.ALL) .build("localhost:9201"); reporter.start(1, TimeUnit.SECONDS); String metricName = "com.codahale.metrics.elasticsearch.test.counter"; Counter counter = registry.counter(metricName); counter.inc(); waitForReporter(); flushAndRefresh(); SearchResponse searchResponse = searchWithTimeout( new SearchRequestBuilder(ElasticsearchIntegrationTest.client()) .setIndices("_all") .setTypes(MetricElasticsearchTypes.COUNTER).setSize(20) .setQuery(QueryBuilders.matchAllQuery()), 1); Assert.assertEquals(true, searchResponse.getHits().getHits().length > 0); Map<String, Object> searchHitSource = searchResponse.getHits() .getHits()[0].getSource(); Assert.assertEquals(prefix + "." + metricName, searchHitSource.get("@name")); Assert.assertEquals(1, searchHitSource.get("count")); Assert.assertEquals(true, searchHitSource.containsKey("@timeywimey")); }