1
4

1 回答 1

1

The method you're testing is a factory. It creates an object. If making sure it's of the expected type is not enough for you, you need to verify its state. Either inspect it with getters, or create an object you're expecting to receive and use assertEquals() to compare it.

于 2016-09-23T21:34:23.043 回答