How do I simplify mockito/hamcrest argument matchers in test method?
问题 The test method below appear in a spring-guide tutorial. Is there a less convoluted syntax to write this test or how can I break it apart into smaller chunks? 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.