// 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;
			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");

		assertEquals(0, timedMethod.getCount());

		meteredClass.timedMethod();
		assertEquals(1, timedMethod.getCount());
	}

	@Test
	public void meteredMethod() throws Throwable {
		Meter meteredMethod = forMeteredMethod(metricRegistry, MeteredClassImpl.class, "meteredMethod");

		assertEquals(0, meteredMethod.getCount());

		meteredClass.meteredMethod();
		assertEquals(1, meteredMethod.getCount());
	}

	@Test
	public void countedMethod() 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;

			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");

		assertEquals(0, timedMethod.getCount());

		meteredClass.timedMethod();
		assertEquals(1, timedMethod.getCount());
	}

	@Test
	public void meteredMethod() throws Throwable {
		Meter meteredMethod = forMeteredMethod(metricRegistry, MeteredClassImpl.class, "meteredMethod");

		assertEquals(0, meteredMethod.getCount());

		meteredClass.meteredMethod();
		assertEquals(1, meteredMethod.getCount());
	}

	@Test
	public void countedMethod() throws Throwable {
		final Counter countedMethod = forCountedMethod(metricRegistry, MeteredClassImpl.class, "countedMethod");