@Test
public void attributes() {
final Counter.Key key = AgentContext.key("ref");
final Object instance = new Object();
final AgentContext context = AgentContext.startOn(key, instance);
context.stop();
assertEquals(instance, context.getReference());
assertEquals(key, context.getKey());
assertEquals(1, Repository.INSTANCE.getCounter(key).getHits());
}
}