<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>excite-naka-sho</author_name>
  <author_url>https://blog.hatena.ne.jp/excite-naka-sho/</author_url>
  <blog_title>エキサイト TechBlog.</blog_title>
  <blog_url>https://tech.excite.co.jp/</blog_url>
  <categories>
  </categories>
  <description>エキサイト株式会社 メディア事業部エンジニアの中です。 SpringBootでRestTemplateを使った外部APIを実行している実装をテストする方法を記載します。 やり方は単純で、mockitoを使います。 ユースケース RestTemplateを使った外部APIを実行している実装をテストする 前提条件 amazonにペットショップの一覧と金額を返すAPIがあると、仮に設定します。 APIのレスポンス [ { &quot;id&quot;: 1, &quot;type&quot;: &quot;dog&quot;, &quot;price&quot;: 249.99 }, { &quot;id&quot;: 2, &quot;type&quot;: &quot;cat&quot;, &quot;price&quot;: 124.99 }, { …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftech.excite.co.jp%2Fentry%2F2021%2F05%2F08%2F120000&quot; title=&quot;SpringBootでRestTemplateを使った外部APIを実行している実装をテストする。 - エキサイト TechBlog.&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-05-08 12:00:00</published>
  <title>SpringBootでRestTemplateを使った外部APIを実行している実装をテストする。</title>
  <type>rich</type>
  <url>https://tech.excite.co.jp/entry/2021/05/08/120000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
