How to add mocked S3Client to spring context on integration tests So basically I have a S3StorageService class that needs a S3Client: