What will be the result of line 19 (select all that apply)?
@RunWith(MockitoJUnitRunner.class)
public class GeoUtilsTest {
@Mock
private Foo foo;
@Mock
private Bar bar;
@Before
public void setUp(){
when(foo.getBar(anyInt()).thenReturn(bar);
when(bar.getFoo(1)).thenReturn(null);
when(bar.getFoo(2)).thenReturn(foo));
}
@Test
public void coordinatesWithNoZipCodeReturnNull() {
Foo f = foo.getBar(2).getFoo(1);
}
Options:
1. null will be assigned to the variable "f"
2. bar will be assigned to the variable "f"
3. foo will be assigned to the variable "f"
4. a null pointer exception will be thrown
Answers
Answered by
0
Answer:
sorry I do not understand
Explanation:
i hope I help you
Similar questions