Skip to content

Instantly share code, notes, and snippets.

@tzachz
Created September 17, 2019 19:03
Show Gist options
  • Save tzachz/4a388a987f43fa48ca32227377d4de06 to your computer and use it in GitHub Desktop.
Save tzachz/4a388a987f43fa48ca32227377d4de06 to your computer and use it in GitHub Desktop.
Mockito gotcha: detail
private def answerSizeOfInputPlus(add: Int): Answer[Int] = invocation => {
val inputArg: String = invocation.getArgumentAt(0, classOf[String])
inputArg.length + add
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment