Test fix
This commit is contained in:
parent
d3e66680f0
commit
090bb30c89
|
@ -6,21 +6,21 @@ import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails;
|
|||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.junit.MockitoJUnitRunner;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.ArgumentMatchers.eq;
|
||||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.*;
|
||||
|
||||
@RunWith(MockitoJUnitRunner.class)
|
||||
public class SearchParamExtractorServiceTest {
|
||||
|
||||
private SearchParamExtractorService mySvc;
|
||||
@Autowired
|
||||
@Mock
|
||||
private IInterceptorBroadcaster myRequestInterceptorBroadcaster;
|
||||
@Autowired
|
||||
@Mock
|
||||
private IInterceptorBroadcaster myJpaInterceptorBroadcaster;
|
||||
|
||||
@Before
|
||||
|
@ -35,6 +35,8 @@ public class SearchParamExtractorServiceTest {
|
|||
searchParamSet.addWarning("help i'm a bug");
|
||||
searchParamSet.addWarning("Spiff");
|
||||
|
||||
when(myJpaInterceptorBroadcaster.callHooks(any(), any())).thenReturn(true);
|
||||
|
||||
mySvc.handleWarnings(new ServletRequestDetails(myRequestInterceptorBroadcaster), searchParamSet);
|
||||
|
||||
verify(myJpaInterceptorBroadcaster, times(2)).callHooks(eq(Pointcut.JPA_PERFTRACE_WARNING), any());
|
||||
|
|
Loading…
Reference in New Issue