{"author_url":"https://blog.hatena.ne.jp/anton0825/","image_url":null,"width":"100%","published":"2015-01-26 00:00:00","provider_name":"Hatena Blog","version":"1.0","type":"rich","blog_url":"https://anton0825.hatenablog.com/","url":"https://anton0825.hatenablog.com/entry/2015/01/26/000000","height":"190","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fanton0825.hatenablog.com%2Fentry%2F2015%2F01%2F26%2F000000\" title=\"Mockito\u3067\u623b\u308a\u5024\u304cvoid\u306e\u30e1\u30bd\u30c3\u30c9\u3092Mock\u3059\u308b - \u65e5\u3005\u7cbe\u9032\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_url":"https://hatena.blog","categories":["Android"],"blog_title":"\u65e5\u3005\u7cbe\u9032","author_name":"anton0825","description":"spy\u3067\u3084\u308b\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u66f8\u304f\u3002 target = Mockito.spy(new MyClass(Robolectric.application)); // target\u306echeck\u30e1\u30bd\u30c3\u30c9\u3092Mock\u306b\u3059\u308b\u3002\u5f15\u6570\u306b\u4f55\u3092\u6e21\u3055\u308c\u305f\u3068\u304d\u3067\u3082Mock\u306b\u3057\u305f\u3044\u5834\u5408\u306f // Mocito.<\u5f15\u6570\u306e\u578b>any()\u3092\u6e21\u3059\u3002 doNothing().when(target).check(Mockito.<MyArgument>any()); \u53c2\u8003\uff1a Mocking a Spy method with Mockito","title":"Mockito\u3067\u623b\u308a\u5024\u304cvoid\u306e\u30e1\u30bd\u30c3\u30c9\u3092Mock\u3059\u308b"}