@Override
    public void logAfterExecution(StatementContext context) {
        log(context);
    }
@Test
    public void logsExecutionTime() {
        final MetricRegistry mockRegistry = mock(MetricRegistry.class);
        final StatementNameStrategy mockNameStrategy = mock(StatementNameStrategy.class);
        final InstrumentedSqlLogger logger = new InstrumentedSqlLogger(mockRegistry, mockNameStrategy);

        final StatementContext mockContext = mock(StatementContext.class);
        final Timer mockTimer = mock(Timer.class);

        final String statementName = "my-fake-name";
        final long fakeElapsed = 1234L;

        when(mockNameStrategy.getStatementName(mockContext)).thenReturn(statementName);
        when(mockRegistry.timer(statementName)).thenReturn(mockTimer);

        when(mockContext.getElapsedTime(ChronoUnit.NANOS)).thenReturn(fakeElapsed);

        logger.logAfterExecution(mockContext);

        verify(mockTimer).update(fakeElapsed, TimeUnit.NANOSECONDS);
    }