<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>seri_wb</author_name>
  <author_url>https://blog.hatena.ne.jp/seri_wb/</author_url>
  <blog_title>White Box技術部</blog_title>
  <blog_url>https://seri.hatenablog.com/</blog_url>
  <categories>
    <anon>Java</anon>
    <anon>JUnit</anon>
    <anon>日記</anon>
  </categories>
  <description>privateメソッドの例外発生テスト メソッド単位にテストを書いていると、privateメソッド単体の試験をしたくなるときがありますが、 リフレクションを使ってテストした場合は、例外の扱いに気をつける必要があります。 というのも、リフレクション中に例外が発生した場合は、InvocationTargetExceptionに例外が包含されるからです。 例えばあるprivateメソッド中でIllegalArgumentExceptionを発生させるテストを書いたとして、 // ここまでに例外が発生するように事前準備等をしてあると仮定 try { // privateメソッドのTestTarget#…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fseri.hatenablog.com%2Fentry%2F2015%2F06%2F10%2F034105&quot; title=&quot;テストでハマるInvocationTargetExceptionとIE80リケーブルの話 - White Box技術部&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>http://cdn-ak.f.st-hatena.com/images/fotolife/s/seri_wb/20150610/20150610034010.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2015-06-10 03:41:05</published>
  <title>テストでハマるInvocationTargetExceptionとIE80リケーブルの話</title>
  <type>rich</type>
  <url>https://seri.hatenablog.com/entry/2015/06/10/034105</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
