// Path: src/test/java/com/ryantenney/metrics/spring/TestUtil.java
// static String forCountedMethod(Class<?> klass, Member member, Counted annotation) {
// 	return Util.forCountedMethod(klass, member, annotation);
// }
// 
// Path: src/test/java/com/ryantenney/metrics/spring/TestUtil.java
// static String forMeteredMethod(Class<?> klass, Member member, Metered annotation) {
// 	return Util.forMeteredMethod(klass, member, annotation);
// }
// 
// Path: src/test/java/com/ryantenney/metrics/spring/TestUtil.java
// static String forTimedMethod(Class<?> klass, Member member, Timed annotation) {
// 	return Util.forTimedMethod(klass, member, annotation);
// }


import com.codahale.metrics.Timer;
import com.codahale.metrics.annotation.Counted;
import com.codahale.metrics.annotation.ExceptionMetered;
import com.codahale.metrics.annotation.Metered;
import com.codahale.metrics.annotation.Timed;
import static com.ryantenney.metrics.spring.TestUtil.forCountedMethod;
import static com.ryantenney.metrics.spring.TestUtil.forMeteredMethod;
import static com.ryantenney.metrics.spring.TestUtil.forTimedMethod;
import static org.junit.Assert.assertEquals;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.codahale.metrics.Counter;
import com.codahale.metrics.Meter;
import com.codahale.metrics.MetricRegistry;
	public void testTimedMethod() {
		ctx.getBean(MeteredClassInterface.class).timedMethod();
		Assert.assertFalse("Metrics should be registered", this.metricRegistry.getTimers().isEmpty());
	}

	@Test
	public void testMeteredMethod() {
		ctx.getBean(MeteredClassInterface.class).meteredMethod();
		Assert.assertFalse("Metrics should be registered", this.metricRegistry.getMeters().isEmpty());
	}

	@Test
	public void testCountedMethod() {
		ctx.getBean(MeteredClassInterface.class).countedMethod(null);
		Assert.assertFalse("Metrics should be registered", this.metricRegistry.getCounters().isEmpty());
	}

	@Test(expected = BogusException.class)
	public void testExceptionMeteredMethod() throws Throwable {
		try {
			ctx.getBean(MeteredClassInterface.class).exceptionMeteredMethod();
		}
		catch (Throwable t) {
			Assert.assertFalse("Metrics should be registered", this.metricRegistry.getMeters().isEmpty());
			throw t;
		}
	}

	@Test
	public void timedMethod() throws Throwable {
// Path: src/test/java/com/ryantenney/metrics/spring/TestUtil.java
// static String forCountedMethod(Class<?> klass, Member member, Counted annotation) {
// 	return Util.forCountedMethod(klass, member, annotation);
// }
// 
// Path: src/test/java/com/ryantenney/metrics/spring/TestUtil.java
// static String forMeteredMethod(Class<?> klass, Member member, Metered annotation) {
// 	return Util.forMeteredMethod(klass, member, annotation);
// }
// 
// Path: src/test/java/com/ryantenney/metrics/spring/TestUtil.java
// static String forTimedMethod(Class<?> klass, Member member, Timed annotation) {
// 	return Util.forTimedMethod(klass, member, annotation);
// }


// Path: src/test/java/com/ryantenney/metrics/spring/MeteredClassImpementsInterfaceTest.java
import com.codahale.metrics.Timer;
import com.codahale.metrics.annotation.Counted;
import com.codahale.metrics.annotation.ExceptionMetered;
import com.codahale.metrics.annotation.Metered;
import com.codahale.metrics.annotation.Timed;
import static com.ryantenney.metrics.spring.TestUtil.forCountedMethod;
import static com.ryantenney.metrics.spring.TestUtil.forMeteredMethod;
import static com.ryantenney.metrics.spring.TestUtil.forTimedMethod;
import static org.junit.Assert.assertEquals;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.codahale.metrics.Counter;
import com.codahale.metrics.Meter;
import com.codahale.metrics.MetricRegistry;

	public void testTimedMethod() {
		ctx.getBean(MeteredClassInterface.class).timedMethod();
		Assert.assertFalse("Metrics should be registered", this.metricRegistry.getTimers().isEmpty());
	}

	@Test
	public void testMeteredMethod() {
		ctx.getBean(MeteredClassInterface.class).meteredMethod();
		Assert.assertFalse("Metrics should be registered", this.metricRegistry.getMeters().isEmpty());
	}

	@Test
	public void testCountedMethod() {
		ctx.getBean(MeteredClassInterface.class).countedMethod(null);
		Assert.assertFalse("Metrics should be registered", this.metricRegistry.getCounters().isEmpty());
	}

	@Test(expected = BogusException.class)
	public void testExceptionMeteredMethod() throws Throwable {
		try {
			ctx.getBean(MeteredClassInterface.class).exceptionMeteredMethod();
		}
		catch (Throwable t) {
			Assert.assertFalse("Metrics should be registered", this.metricRegistry.getMeters().isEmpty());
			throw t;
		}
	}

	@Test
	public void timedMethod() throws Throwable {
		Timer timedMethod = forTimedMethod(metricRegistry, MeteredClassImpl.class, "timedMethod");