Mockito equivalent to this Hamcrest “samePropertyValuesAs”/jMock “with” idiom?
问题 Hamcrest/jMock code looks like this: @Test public void setsSniperValuesInColumns() { context.checking(new Expectations() {{ one(listener).tableChanged(with(aRowChangedEvent())); }}); model.sniperStatusChanged(new SniperState("item id", 555, 666), MainWindow.STATUS_BIDDING); ... } private Matcher<TableModelEvent> aRowChangedEvent() { return samePropertyValuesAs(new TableModelEvent(model, 0)); } NB this is taken from "Growing Object-Oriented Software Guided by Tests" (p. 157). The authors of