Fixes to S3Sink.
Add tests for CounterInterceptor