Assert that Optional has certain value

前端 未结 5 2151
南笙
南笙 2020-12-29 19:54

I have a Java method that returns an Optional. I\'d like to write an easy-to-read unit test for it that asserts that

  1. the returned Optional has a value (i.e.

5条回答
提交回复
热议问题