Issue with stubbing/mocking the method with makes a DB call
问题 I am having issue with Mocking a JDBC call using the MockitoJUnitRunner. Somehow Mockito is not mocking the actual call even though I have below subbing line into the test class. when(readOnlyJdbcTemplate.query(anyString(), any(Object[].class), any(int[].class), any(FeatureCollectionResponseExtractor.class))).thenReturn(actual); Very similar mocking is working in another class for very similar type of method. The only difference between them is my other class does have 3 parameters instead of