### Question:
SessionImpl implements Session, SessionImplementor { public void execute(final Object bapiObject) { assertNotClosed(); Class<?> bapiClass = bapiObject.getClass(); Map<String, BapiMapping> bapiMappings = sessionManager.getBapiMappings(); if (bapiMappings.containsKey(bapiClass.getName())) { bapiInterceptors.announce().beforeExecution(bapiObject); execute(bapiObject, bapiMappings.get(bapiClass.getName())); bapiInterceptors.announce().afterExecution(bapiObject); } else { throw new HibersapException(bapiClass.getName() + " is not mapped as a Bapi class"); } } SessionImpl(final SessionManagerImplementor sessionManager);  SessionImpl(final SessionManagerImplementor sessionManager, final Credentials credentials); Transaction beginTransaction(); void close(); void execute(final Object bapiObject); void execute(final Object bapiObject, final BapiMapping bapiMapping); SessionManagerImplementor getSessionManager(); Transaction getTransaction(); boolean isClosed(); void addExecutionInterceptor(final ExecutionInterceptor interceptor); void addBapiInterceptor(final BapiInterceptor interceptor);  }### Answer:
@Test public void bapiInterceptorFromConfigurationIsCalledWhenExecutingFunction() { final Object bapiObject = new Object(); session.execute(bapiObject); verify(bapiInterceptor).beforeExecution(bapiObject); verify(bapiInterceptor).afterExecution(bapiObject); }
@Test public void executionInterceptorsFromConfigurationIsCalledWhenExecutingFunction() { final Object bapiObject = new Object(); session.execute(bapiObject); verify(executionInterceptor).beforeExecution(any(), any()); verify(executionInterceptor).afterExecution(any(), any()); }