@Test
public void testFindMatchingByTags() {

    val lookupTime = 60;
    List<Map<String, String>> tagsList = new ArrayList<>();
    MatchingDetectorsResponse mockMatchingDetectorsResponse = mockMatchingDetectorsResponse(lookupTime, detectorUuid);
    when(detectorMappingRepo.findMatchingDetectorMappings(tagsList)).thenReturn(mockMatchingDetectorsResponse);
    MatchingDetectorsResponse matchingDetectorsResult = controllerUnderTest.searchDetectorMapping(tagsList);
    Assert.assertEquals(1, matchingDetectorsResult.getGroupedDetectorsBySearchIndex().size());
    List<ConsumerDetectorMapping> consumerDetectorMappings = matchingDetectorsResult.getGroupedDetectorsBySearchIndex().get(1);
    assertEquals(1, consumerDetectorMappings.size());
    assertEquals(UUID.fromString(detectorUuid), consumerDetectorMappings.get(0).getUuid());
}