+private fun isLinkedElement(link: Matcher<String> = everything(), properties: Matcher<Map<String, Any?>> = everything(), failed: Matcher<Boolean> = everything(), loading: Matcher<Boolean> = everything()) = object : TypeSafeDiagnosingMatcher<LinkedElement>() {
+ override fun matchesSafely(item: LinkedElement, mismatchDescription: Description) =
+ handleMatcher(link, item.link, mismatchDescription) &&
+ handleMatcher(properties, item.properties, mismatchDescription) &&
+ handleMatcher(failed, item.failed, mismatchDescription) &&
+ handleMatcher(loading, item.loading, mismatchDescription)
+
+ override fun describeTo(description: Description) {
+ description.appendText("is linked element for key matching ").appendValue(link)
+ .appendText(", properties matching ").appendValue(properties)
+ .appendText(", failed matching ").appendValue(failed)
+ .appendText(", loading matching ").appendValue(loading)
+ }
+}
+