// Path: src/test/java/com/ryantenney/metrics/spring/reporter/FakeReporter.java
// public class FakeReporter extends ScheduledReporter {
// 
// 	private final MetricRegistry registry;
// 	private final MetricFilter filter;
// 	private final String prefix;
// 
// 	private long period;
// 	private int calls = 0;
// 	private boolean running = false;
// 
// 	public FakeReporter(MetricRegistry registry, MetricFilter filter, String prefix, TimeUnit rateUnit, TimeUnit durationUnit) {
// 		super(registry, "test-reporter", filter, rateUnit, durationUnit);
// 		this.registry = registry;
// 		this.filter = filter;
// 		this.prefix = prefix;
// 	}
// 
// 	public MetricRegistry getRegistry() {
// 		return registry;
// 	}
// 
// 	public MetricFilter getFilter() {
// 		return filter;
// 	}
// 
// 	public String getPrefix() {
// 		return prefix;
// 	}
// 
// 	@Override
// 	public String getRateUnit() {
// 		return super.getRateUnit();
// 	}
// 
// 	@Override
// 	public String getDurationUnit() {
// 		return super.getDurationUnit();
// 	}
// 
// 	public long getPeriod() {
// 		return period;
// 	}
// 
// 	public int getCalls() {
// 		return calls;
// 	}
// 
// 	public boolean isRunning() {
// 		return running;
// 	}
// 
// 	@Override
// 	public void start(final long period, final TimeUnit unit) {
// 		super.start(period, unit);
// 		this.period = unit.toNanos(period);
// 		this.running = true;
// 	}
// 
// 	@Override
// 	public void stop() {
// 		super.stop();
// 		this.running = false;
// 	}
// 
// 	@Override
// 	@SuppressWarnings("rawtypes")
// 	public void report(SortedMap<String, Gauge> gauges, SortedMap<String, Counter> counters, SortedMap<String, Histogram> histograms,
// 			SortedMap<String, Meter> meters, SortedMap<String, Timer> timers) {
// 		calls++;
// 	}
// 
// }
// 
// Path: src/main/java/com/ryantenney/metrics/spring/reporter/MetricPrefixSupplier.java
// public interface MetricPrefixSupplier {
// 
// 	String getPrefix();
// 
// }


import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.util.Collection;
import com.palominolabs.metrics.newrelic.NewRelicReporter;
import org.coursera.metrics.datadog.DatadogReporter;
import org.junit.Assert;
import org.junit.Test;
import org.springframework.aop.support.AopUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.codahale.metrics.ConsoleReporter;
import com.codahale.metrics.CsvReporter;
import com.codahale.metrics.JmxReporter;
import com.codahale.metrics.Metric;
import com.codahale.metrics.MetricFilter;
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.SharedMetricRegistries;
import com.codahale.metrics.Slf4jReporter;
import com.codahale.metrics.ganglia.GangliaReporter;
import com.codahale.metrics.graphite.GraphiteReporter;
import com.ryantenney.metrics.spring.reporter.FakeReporter;
import com.ryantenney.metrics.spring.reporter.MetricPrefixSupplier;
import static org.hamcrest.Matchers.*;
/**
 * Copyright (C) 2012 Ryan W Tenney (ryan@10e.us)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.ryantenney.metrics.spring;






public class ReporterTest {

	private static final String TEST_PREFIX = "test.i-001a391f";

	@SuppressWarnings("resource")
	@Test
	public void fakeReporters() throws Throwable {
		ClassPathXmlApplicationContext ctx = null;
// Path: src/test/java/com/ryantenney/metrics/spring/reporter/FakeReporter.java
// public class FakeReporter extends ScheduledReporter {
// 
// 	private final MetricRegistry registry;
// 	private final MetricFilter filter;
// 	private final String prefix;
// 
// 	private long period;
// 	private int calls = 0;
// 	private boolean running = false;
// 
// 	public FakeReporter(MetricRegistry registry, MetricFilter filter, String prefix, TimeUnit rateUnit, TimeUnit durationUnit) {
// 		super(registry, "test-reporter", filter, rateUnit, durationUnit);
// 		this.registry = registry;
// 		this.filter = filter;
// 		this.prefix = prefix;
// 	}
// 
// 	public MetricRegistry getRegistry() {
// 		return registry;
// 	}
// 
// 	public MetricFilter getFilter() {
// 		return filter;
// 	}
// 
// 	public String getPrefix() {
// 		return prefix;
// 	}
// 
// 	@Override
// 	public String getRateUnit() {
// 		return super.getRateUnit();
// 	}
// 
// 	@Override
// 	public String getDurationUnit() {
// 		return super.getDurationUnit();
// 	}
// 
// 	public long getPeriod() {
// 		return period;
// 	}
// 
// 	public int getCalls() {
// 		return calls;
// 	}
// 
// 	public boolean isRunning() {
// 		return running;
// 	}
// 
// 	@Override
// 	public void start(final long period, final TimeUnit unit) {
// 		super.start(period, unit);
// 		this.period = unit.toNanos(period);
// 		this.running = true;
// 	}
// 
// 	@Override
// 	public void stop() {
// 		super.stop();
// 		this.running = false;
// 	}
// 
// 	@Override
// 	@SuppressWarnings("rawtypes")
// 	public void report(SortedMap<String, Gauge> gauges, SortedMap<String, Counter> counters, SortedMap<String, Histogram> histograms,
// 			SortedMap<String, Meter> meters, SortedMap<String, Timer> timers) {
// 		calls++;
// 	}
// 
// }
// 
// Path: src/main/java/com/ryantenney/metrics/spring/reporter/MetricPrefixSupplier.java
// public interface MetricPrefixSupplier {
// 
// 	String getPrefix();
// 
// }


// Path: src/test/java/com/ryantenney/metrics/spring/ReporterTest.java
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.util.Collection;
import com.palominolabs.metrics.newrelic.NewRelicReporter;
import org.coursera.metrics.datadog.DatadogReporter;
import org.junit.Assert;
import org.junit.Test;
import org.springframework.aop.support.AopUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.codahale.metrics.ConsoleReporter;
import com.codahale.metrics.CsvReporter;
import com.codahale.metrics.JmxReporter;
import com.codahale.metrics.Metric;
import com.codahale.metrics.MetricFilter;
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.SharedMetricRegistries;
import com.codahale.metrics.Slf4jReporter;
import com.codahale.metrics.ganglia.GangliaReporter;
import com.codahale.metrics.graphite.GraphiteReporter;
import com.ryantenney.metrics.spring.reporter.FakeReporter;
import com.ryantenney.metrics.spring.reporter.MetricPrefixSupplier;
import static org.hamcrest.Matchers.*;

/**
 * Copyright (C) 2012 Ryan W Tenney (ryan@10e.us)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.ryantenney.metrics.spring;






public class ReporterTest {

	private static final String TEST_PREFIX = "test.i-001a391f";

	@SuppressWarnings("resource")
	@Test
	public void fakeReporters() throws Throwable {
		ClassPathXmlApplicationContext ctx = null;
		FakeReporter one = null;