public static < T > T createNiceMock ( Class < T > type , Object ... constructorArguments ) { Constructor < ? > constructor = WhiteboxImpl . findUniqueConstructorOrThrowException ( type , constructorArguments ) ; ConstructorArgs constructorArgs = new ConstructorArgs ( constructor , constructorArguments ) ; return doMock ( type , false , new NiceMockStrategy ( ) , constructorArgs , ( Method [ ] ) null ) ; }
Creates a nice mock object that supports mocking of final and native methods and invokes a specific constructor based on the supplied argument values .