[BAEL-14274] - Fixed article code for https://www.baeldung.com/mockito-annotations
This commit is contained in:
parent
783a93fb47
commit
11b02b5ba6
|
@ -30,7 +30,7 @@ public class MockitoInjectIntoSpyUnitTest {
|
||||||
private MyDictionary spyDic;
|
private MyDictionary spyDic;
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void whenUseInjectMocksAnnotation_thenCorrect2() {
|
public void whenUseInjectMocksAnnotation_thenCorrect() {
|
||||||
Mockito.when(wordMap.get("aWord")).thenReturn("aMeaning");
|
Mockito.when(wordMap.get("aWord")).thenReturn("aMeaning");
|
||||||
|
|
||||||
assertEquals("aMeaning", spyDic.getMeaning("aWord"));
|
assertEquals("aMeaning", spyDic.getMeaning("aWord"));
|
||||||
|
|
Loading…
Reference in New Issue