<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Naotsugu</author_name>
  <author_url>https://blog.hatena.ne.jp/Naotsugu/</author_url>
  <blog_title>A Memorandum</blog_title>
  <blog_url>https://blog1.mammb.com/</blog_url>
  <categories>
    <anon>Java</anon>
  </categories>
  <description>前回 blog1.mammb.comに引き続き、Unitils によるモックオブジェクトのサポートを見ていきます。 メソッド呼び出しの検証 テスト対象のクラスのメソッド呼び出しにより、モックが期待通りに呼び出されたかを検証するには以下のようにします(通常モックオブジェクトのメソッドの戻り値が void の場合に使用)。 @Test public final void testAddNewItem() { itemService.addNewItem(1L, &quot;name&quot;); mockItemDao.assertInvoked().save(new Item(1L, &quot;name&quot;)); } この…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog1.mammb.com%2Fentry%2F20091104%2F1257347914&quot; title=&quot;単体テストを簡単に Unitils 〜モックオブジェクト 2 〜 - A Memorandum&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>2009-11-04 00:18:34</published>
  <title>単体テストを簡単に Unitils 〜モックオブジェクト 2 〜</title>
  <type>rich</type>
  <url>https://blog1.mammb.com/entry/20091104/1257347914</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
