$B:4F#$H?=$7$^$9!#(B<br>$B$$$D$b$*@$OC$K$J$C$F$*$j$^$9!#(B<br><br>class HogeService {<br><br>&nbsp; @resource<br>&nbsp; private HogeLogic hogeLogic;<br><br>}<br><br>HogeService$B$N%F%9%H%1!<%9$G!"(BhogeLogic$B$r(BMockInterceptor$B$r;H$C$?(BMock$B$KCV$-49$($?$$$H$-!"(B<br>$B$I$N$h$&$K$9$l$P$h$$$G$7$g$&$+!)(B<br><br>HogeLogic$B$O(Blogic.dicon$B$K(B<br>
&nbsp;&nbsp;&nbsp; &lt;component<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class=&quot;com.hoge.impl.HogeLogicImpl&quot; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; instance=&quot;prototype&quot;&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;aspect&gt;j2ee.requiredTx&lt;/aspect&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;/component&gt;<br>$B$N$h$&$KDj5A$5$l$F$$$F!"(B<br><br>mock.dicon $B$K(B<br>&nbsp;&nbsp;&nbsp; &lt;component name=&quot;mockInterceptor&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class=&quot;org.seasar.framework.aop.interceptors.MockInterceptor&quot;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;initMethod name=&quot;setReturnValue&quot;&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;arg&gt;&quot;getCenterSeq&quot;&lt;/arg&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;arg&gt;&quot;9998000001&quot;&lt;/arg&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/initMethod&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/component&gt;<br>&nbsp;&nbsp;&nbsp; &lt;component<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class=&quot;com.hoge.HogeLogic&quot; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; instance=&quot;prototype&quot;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;aspect&gt;mockInterceptor&lt;/aspect&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/component&gt;<br>$B$H=q$$$F!"(B<br><br>app.dicon$B$G$O(B<br>mock.dicon$B$H(Blogic.dicon$B$r(Binclude$B$7$^$7$?!#(B<br>$B=gHV$rF~$lBX$($F$_$F$b!"<BBV(B(HogeLogicImpl)$B$N$[$&$,%;%C%H$5$l$F$7$^$$$^$9!#(B<br>
<br>logic.dicon$B$r(Binclude$B$7$J$1$l$P$$$$$@$1$NOC$J$s$G$9$,!"B>$K$b$?$/$5$sEPO?$5$l$F$$$k$N$G!#(B<br>$B2#Ce$G$-$kJ}K!$O$J$$$+$H!#(B<br><br>$BF1$8%$%s%?!<%U%'!<%9$r;}$D(BComponent$B$N>l9g!"M%@h$5$l$k=g0L$H$+$"$k$s$G$7$g$&$+!)(B<br><br>$B%9%^!<%H$JJ}K!$,$"$j$^$7$?$i65$($F$/$@$5$$!#(B<br><br><br>