public static synchronized < T > T createStrictMockAndExpectNew ( Class < T > type , Object ... arguments ) throws Exception { T mock = createStrictMock ( type ) ; expectStrictNew ( type , arguments ) . andReturn ( mock ) ; return mock ; }
Convenience method for createStrictMock followed by expectNew .