{"url":"https://seratch.hatenablog.jp/entry/2013/06/26/185520","height":"190","width":"100%","blog_title":"seratch's weblog in Japanese","categories":["Scala"],"published":"2013-06-26 18:55:20","type":"rich","title":"ScalaTest 1.9.1 \u306e MockitoSugar \u306f\u4f7f\u3046\u3079\u304d\u3067\u306a\u3044","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fseratch.hatenablog.jp%2Fentry%2F2013%2F06%2F26%2F185520\" title=\"ScalaTest 1.9.1 \u306e MockitoSugar \u306f\u4f7f\u3046\u3079\u304d\u3067\u306a\u3044 - seratch&#39;s weblog in Japanese\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_url":"https://seratch.hatenablog.jp/","author_url":"https://blog.hatena.ne.jp/seratch2/","version":"1.0","provider_url":"https://hatena.blog","description":"Scala \u3067\u76f4\u63a5 Mockito \u3092\u4f7f\u304a\u3046\u3068\u3057\u305f\u3053\u3093\u306a\u30b3\u30fc\u30c9\u3067 import org.scalatest._ import mock.MockitoSugar import org.mockito.Mockito._ class SomeSpec extends FlatSpec with MockitoSugar { it should \"judge a valid session\" in { val req = mock[HttpServletRequest] val session = mock[HttpSession] when(req.getSession).thenReturn(\u2026","image_url":null,"author_name":"seratch2","provider_name":"Hatena Blog"}