@Test
public void updatesTimerForContextGroupTypeAndName() throws Exception {
final StatementNameStrategy strategy = new SmartNameStrategy();
final InstrumentedTimingCollector collector = new InstrumentedTimingCollector(registry,
strategy);
final StatementContext ctx = mock(StatementContext.class);
doReturn("SELECT 1").when(ctx).getRawSql();
doReturn("my-group").when(ctx).getAttribute(NameStrategies.STATEMENT_GROUP);
doReturn("my-type").when(ctx).getAttribute(NameStrategies.STATEMENT_TYPE);
doReturn("updatesTimerForContextGroupTypeAndName").when(ctx)
.getAttribute(NameStrategies.STATEMENT_NAME);