<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>testing on Diogo Moreira</title><link>https://diogomoreira.dev/tags/testing/</link><description>Recent content in testing on Diogo Moreira</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Sun, 10 Dec 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://diogomoreira.dev/tags/testing/index.xml" rel="self" type="application/rss+xml"/><item><title>Mocking Google Cloud Storage Objects with Java</title><link>https://diogomoreira.dev/blog/mocking-google-cloud-storage-blob-objects/</link><pubDate>Sun, 10 Dec 2023 00:00:00 +0000</pubDate><guid>https://diogomoreira.dev/blog/mocking-google-cloud-storage-blob-objects/</guid><description>&lt;p&gt;Google Cloud Storage is widely used as a cloud storage service to allow users to store and retrieve objects. When working with it, it&amp;rsquo;s essential to write efficient unit tests to ensure the application behaves as expected.&lt;/p&gt;
&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;One common challenge in unit testing is dealing with external dependencies, that&amp;rsquo;s when we use &lt;a href="https://stackoverflow.com/questions/2665812/what-is-mocking"&gt;&lt;em&gt;mocks&lt;/em&gt;&lt;/a&gt; such as Blob Objects from Google Cloud Storage, which may not be readily available during testing or needs to be mocked due to &lt;em&gt;pricing restrictions&lt;/em&gt;. This blog post will explore how to mock Blob Objects from &lt;strong&gt;Google Cloud Storage&lt;/strong&gt; for efficient unit testing.&lt;/p&gt;</description></item></channel></rss>