I am totally new to Mockito and Software Testing in Java. This is the pseudocode:
class serviceX()
{
void seedCounter(Apple apple)
{
Seed seeds = apple.getSeeds(where seed colour is red)
(if seeds is not null) print("found red seeds")
else print("found nothing")
}
}
getSeeds is a class method of Apple class. Now I want to test seedCounter. I want to test a scene where I assume(something like mockito.when(i send an apple with red seeds).thenReturn(notNull)) that i send an apple with red coloured seeds. How do i create a mock scene out of this? I want to test if i am getting "found red seeds" as an output or not.