verifyNew(MyClass.class).withNoArguments();
}
@Test
public void testMultipleNew() throws Exception {
ExpectNewDemo tested = new ExpectNewDemo();
MyClass myClassMock = mock(MyClass.class);
whenNew(MyClass.class).withNoArguments().thenReturn(myClassMock);
when(myClassMock.getMessage()).thenReturn("Hello");
final String actual = tested.multipleNew();
verify(myClassMock, times(2)).getMessage();
verifyNew(MyClass.class, times(2)).withNoArguments();
assertEquals("HelloHello", actual);