Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 1
    You don't need to do this with Mockito: JUnit will fail your test if an exception is thrown when that method is called. So... you don't need to do anything extra. Commented Aug 10, 2016 at 8:59
  • ok but it doesn't seem like its actually testing anything? i.e. there are no verifys or asserts etc? Commented Aug 10, 2016 at 9:00
  • Currently, you are simply testing that this method doesn't throw an exception. You are free to add more checks, e.g. that getBalanceForPerson returns the expected value - but that's a JUnit check, assertEquals(expectedBalance, result). Commented Aug 10, 2016 at 9:01