Skip to content

Instantly share code, notes, and snippets.

mockery.checking(new WExpectations() {{
//Create a mockery of the ReportPublisher and CBUS class
q.reporter = mockery.mock(ReportPublisher.class);
q.cbusClient = mockery.mock(CBUS.class);
//Invoke one instance of the ReportPublisher mock object with the send method
one(q.reporter).send(with(havingRows(2)), with(any(ReportCategory.class)), with(equal(SEVERE)));
//Invoke one instance of the CBUS mock object with the send method
one(q.cbusClient).invoke(with(query(new GetEtfModels())));