### Question:
LoggingInterceptor implements Interceptor { @Nullable @Override public <Result, WrappedResult, Data> Result intercept(@NonNull PreparedOperation<Result, WrappedResult, Data> operation, @NonNull Chain chain) { final long startMillis = SystemClock.elapsedRealtime(); final Result result = chain.proceed(operation); final long endMillis = SystemClock.elapsedRealtime(); logger.log( String.format( Locale.US, "%s\n=> data: %s\n<= result: %s\ntook %dms", operation.getClass().getSimpleName(), operation.getData(), result, endMillis - startMillis ) ); return result; } private  LoggingInterceptor(@NonNull Logger logger); @SuppressWarnings("LogNotTimber") // Library should not depend on Timber. @NonNull static LoggingInterceptor defaultLogger(); @NonNull static LoggingInterceptor withLogger(@NonNull Logger logger); @Nullable @Override Result intercept(@NonNull PreparedOperation<Result, WrappedResult, Data> operation, @NonNull Chain chain);  }### Answer:
@Test public void interceptShouldLogToLogger() { final String result = "some result"; final String data = "some data"; final Interceptor.Chain chain = new TestChain(result); final PreparedOperation operation = new TestOperation(data); loggingInterceptor.intercept(operation, chain); assertThat(resultBuilder.toString()).startsWith( "TestOperation\n=> data: some data\n<= result: some result\ntook " ); }