下面的测试方法出现在spring-guide 教程中。编写这个测试是否有一种不那么复杂的语法,或者我怎样才能把它分成更小的块?
verify(orderService).createOrder(
org.mockito.Matchers.<CreateOrderEvent>argThat(
allOf( org.hamcrest.Matchers.<CreateOrderEvent>
hasProperty("details",
hasProperty("dateTimeOfSubmission", notNullValue())),
org.hamcrest.Matchers.<CreateOrderEvent>hasProperty("details",
hasProperty("name", equalTo(CUSTOMER_NAME))),
org.hamcrest.Matchers.<CreateOrderEvent>hasProperty("details",
hasProperty("address1", equalTo(ADDRESS1))),
org.hamcrest.Matchers.<CreateOrderEvent>hasProperty("details",
hasProperty("postcode", equalTo(POST_CODE)))
)));