今回は、JunitテストでPageableをパラメータとして持っているControllerをテスト時にはまったところに記録です。
Controller

- ControllerでSearchRequestForm意外にもPageableを受け取っています。
テストクラス

- フィールドにMockMvcを定義してinitメソッドでMockMvcBuildersを使ってControllerを挿入しています。
上記のようにセットしてsearchTestを起動すると以下のエラーになります。
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalStateException: No primary or default constructor found for interface org.springframework.data.domain.Pageable
解決

MockMvcをBuildする時、Pageableの設定も追加します。
これでOKです!
setCustomArgumentResolvers(new PageableHandlerMethodArgumentResolver())
終わりに
プロジェクトでずっとエラーになり、ハマってたんですけどググってみたらRest対応しか出てこなくて、DOCを読みながら。。。解決しました。
