in junit tests with mockito, has anyone tried to m...
# android
a
in junit tests with mockito, has anyone tried to mock an ArrayList and use apply to wrap several whens? like:
Copy code
mock<List<Any>>().apply {
    `when`(size).thenReturn(listSize)
    `when`(this[previousIndex]).thenReturn(previousItem)
    `when`(this[index]).thenReturn(currentItem)
}