{
ClassFactory cf = new ClassFactoryImpl();
Runnable r = (Runnable) newMock(Runnable.class);
MockControl logControl = newControl(Log.class);
Log log = (Log) logControl.getMock();
LoggingInterceptorClassFactory f = new LoggingInterceptorClassFactory(cf);
MockControl spControl = newControl(ServicePoint.class);
ServicePoint sp = (ServicePoint) spControl.getMock();
// Training
sp.getServiceInterface();
spControl.setReturnValue(Runnable.class);
sp.getExtensionPointId();
spControl.setReturnValue("foo.bar");
replayControls();
// Create interceptor
InterceptorStackImpl is = new InterceptorStackImpl(log, sp, r);
Class interceptorClass = f.constructInterceptorClass(is, Collections.EMPTY_LIST);
Constructor c = interceptorClass.getConstructors()[0];
Object interceptor = c.newInstance(new Object[] { is.getServiceLog(), is.peek() });
is.push(interceptor);
Runnable ri = (Runnable) is.peek();
verifyControls();
// Training
log.isDebugEnabled();
logControl.setReturnValue(true);
log.debug("BEGIN run()");
log.debug("END run()");
r.run();
replayControls();