use of org.hisp.dhis.webapi.controller.CrudControllerAdvice in project dhis2-core by dhis2.
the class DeduplicationControllerMvcTest method setUp.
@BeforeEach
void setUp() {
deduplicationMergeParams = DeduplicationMergeParams.builder().potentialDuplicate(new PotentialDuplicate(teiA, teiB)).original(trackedEntityInstanceA).duplicate(trackedEntityInstanceB).mergeObject(MergeObject.builder().build()).build();
mockMvc = MockMvcBuilders.standaloneSetup(deduplicationController).setControllerAdvice(new CrudControllerAdvice()).build();
lenient().when(trackedEntityInstanceService.getTrackedEntityInstance(teiA)).thenReturn(trackedEntityInstanceA);
lenient().when(trackedEntityInstanceService.getTrackedEntityInstance(teiB)).thenReturn(trackedEntityInstanceB);
lenient().when(trackerAccessManager.canRead(any(), any(TrackedEntityInstance.class))).thenReturn(Lists.newArrayList());
}
Aggregations