21
21
@ RunWith (MockitoJUnitRunner .class )
22
22
public class StudyViewServiceImplTest extends BaseServiceImplTest {
23
23
24
+ @ Spy
24
25
@ InjectMocks
25
26
private StudyViewServiceImpl studyViewService ;
26
27
@ Mock
@@ -251,9 +252,8 @@ public void getMutationCountsByGeneSpecific() {
251
252
genomicDataCounts .add (genomicDataCount2 );
252
253
genomicDataCountItem .setCounts (genomicDataCounts );
253
254
254
- Mockito .when (studyViewService .getMutationTypeCountsByGeneSpecific (
255
- anyList (), anyList (), anyList ()
256
- )).thenReturn (Collections .singletonList (genomicDataCountItem ));
255
+ Mockito .doReturn (Collections .singletonList (genomicDataCountItem ))
256
+ .when (studyViewService ).getMutationTypeCountsByGeneSpecific (anyList (), anyList (), anyList ());
257
257
258
258
List <GenomicDataCountItem > result = studyViewService .getMutationCountsByGeneSpecific (
259
259
studyIds , sampleIds , genomicDataFilters , alterationFilter , "SUMMARY" );
@@ -263,7 +263,7 @@ public void getMutationCountsByGeneSpecific() {
263
263
result = studyViewService .getMutationCountsByGeneSpecific (
264
264
studyIds , sampleIds , genomicDataFilters , alterationFilter , "DETAILED" );
265
265
Assert .assertEquals (1 , result .size ());
266
- Assert .assertTrue ( 3 <= result .get (0 ).getCounts ().size ());
266
+ Assert .assertEquals ( 4 , result .get (0 ).getCounts ().size ());
267
267
}
268
268
269
269
@ Test
0 commit comments