Use more concise SAM implementation
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 3 May 2017 18:26:51 +0000 (20:26 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 5 May 2017 20:51:35 +0000 (22:51 +0200)
src/test/kotlin/net/pterodactylus/sone/web/pages/IndexPageTest.kt

index 04c83d6..e6256bb 100644 (file)
@@ -26,9 +26,7 @@ class IndexPageTest : WebPageTest() {
 
        @Before
        fun setupPostVisibilityFilter() {
-               whenever(postVisibilityFilter.isVisible(ArgumentMatchers.eq(currentSone))).thenReturn(object : Predicate<Post> {
-                       override fun apply(input: Post?) = true
-               })
+               whenever(postVisibilityFilter.isVisible(ArgumentMatchers.eq(currentSone))).thenReturn(Predicate<Post> { true })
        }
 
        private fun createPost(time: Long, directed: Boolean = false) = mock<Post>().apply {