@Test public void testSearch() throws Exception { when(mockSearchService.search(Matchers.any(NameUsageSearchRequest.class))).thenReturn(searchResponse); SearchResponse<NameUsageSearchResult, NameUsageSearchParameter> searchResponse2 = resource.search(new NameUsageSearchRequest(1000L, 20)); assertNotNull(searchResponse2); }
@GET @Path("search") public SearchResponse<NameUsageSearchResult, NameUsageSearchParameter> search(@Context NameUsageSearchRequest searchRequest) { checkDeepPaging(searchRequest); return searchService.search(searchRequest); }
SpeciesResource { @GET @Path("search") public SearchResponse<NameUsageSearchResult, NameUsageSearchParameter> search(@Context NameUsageSearchRequest searchRequest) { checkDeepPaging(searchRequest); return searchService.search(searchRequest); } }
SpeciesResource { @GET @Path("search") public SearchResponse<NameUsageSearchResult, NameUsageSearchParameter> search(@Context NameUsageSearchRequest searchRequest) { checkDeepPaging(searchRequest); return searchService.search(searchRequest); } @Inject  SpeciesResource(
      NameUsageService nameUsageService, VernacularNameService vernacularNameService,
      TypeSpecimenService typeSpecimenService, SpeciesProfileService speciesProfileService,
      ReferenceService referenceService, MultimediaService imageService, DescriptionService descriptionService,
      DistributionService distributionService, IdentifierService identifierService, NameUsageSearchService searchService,
      UsageCountMapper usageCountMapper); }
SpeciesResource { @GET @Path("search") public SearchResponse<NameUsageSearchResult, NameUsageSearchParameter> search(@Context NameUsageSearchRequest searchRequest) { checkDeepPaging(searchRequest); return searchService.search(searchRequest); } @Inject  SpeciesResource(
      NameUsageService nameUsageService, VernacularNameService vernacularNameService,
      TypeSpecimenService typeSpecimenService, SpeciesProfileService speciesProfileService,
      ReferenceService referenceService, MultimediaService imageService, DescriptionService descriptionService,
      DistributionService distributionService, IdentifierService identifierService, NameUsageSearchService searchService,
      UsageCountMapper usageCountMapper); @GET PagingResponse<NameUsage> list(@Context Locale locale, @QueryParam(DATASET_KEY) Set<UUID> datasetKeys,
                                        @QueryParam("sourceId") String sourceId, @QueryParam("name") String canonicalName, @Context Pageable page); @GET @Path("{id}") @NullToNotFound NameUsage get(@PathParam("id") int usageKey, @Context Locale locale); @GET @Path("{id}/metrics") @NullToNotFound NameUsageMetrics getMetrics(@PathParam("id") int usageKey); @GET @Path("{id}/name") @NullToNotFound ParsedName getParsedName(@PathParam("id") int usageKey); @GET @Path("{id}/verbatim") @NullToNotFound VerbatimNameUsage getVerbatim(@PathParam("id") int usageKey); @GET @Path("{id}/children") PagingResponse<NameUsage> listChildren(@PathParam("id") int parentKey, @Context Locale locale, @Context Pageable page); @GET @Path("{id}/childrenAll") List<UsageCount> listAllChildren(@PathParam("id") int parentKey); @GET @Path("{id}/synonyms") PagingResponse<NameUsage> listSynonyms(@PathParam("id") int usageKey, @Context Locale locale, @Context Pageable page); @GET @Path("{id}/vernacularNames") PagingResponse<VernacularName> listVernacularNamesByNameUsage(@PathParam("id") int usageKey, @Context Pageable page); @GET @Path("{id}/typeSpecimens") PagingResponse<TypeSpecimen> listTypeSpecimensByNameUsage(@PathParam("id") int usageKey, @Context Pageable page); @GET @Path("{id}/speciesProfiles") PagingResponse<SpeciesProfile> listSpeciesProfilesByNameUsage(@PathParam("id") int usageKey, @Context Pageable page); @GET @Path("{id}/references") PagingResponse<Reference> listReferencesByNameUsage(@PathParam("id") int usageKey, @Context Pageable page); @GET @Path("{id}/media") PagingResponse<NameUsageMediaObject> listImagesByNameUsage(@PathParam("id") int usageKey, @Context Pageable page); @GET @Path("{id}/descriptions") PagingResponse<Description> listDescriptionsByNameUsage(@PathParam("id") int usageKey, @Context Pageable page); @GET @Path("{id}/toc") @NullToNotFound TableOfContents get(@PathParam("id") Integer key); @GET @Path("{id}/distributions") PagingResponse<Distribution> listDistributionsByNameUsage(@PathParam("id") int usageKey, @Context Pageable page); @GET @Path("{id}/identifier") PagingResponse<Identifier> listIdentifierByNameUsage(@PathParam("id") int usageKey, @Context Pageable page); @GET @Path("{id}/related") PagingResponse<NameUsage> listRelatedByNameUsage(@PathParam("id") int usageKey, @Context Locale locale, @Context Pageable page,
                                                          @QueryParam(DATASET_KEY) Set<UUID> datasetKeys); @GET @Path("{id}/combinations") List<NameUsage> listCombinations(@PathParam("id") int basionymKey, @Context Locale locale); @GET @Path("{id}/parents") List<NameUsage> listParentsByNameUsage(@PathParam("id") int usageKey, @Context Locale locale, @Context Pageable page); @GET @Path("root/{datasetKey}") PagingResponse<NameUsage> listRootUsages(@PathParam(DATASET_KEY) UUID datasetKey, @Context Locale locale, @Context Pageable page); @GET @Path("rootAll/{datasetKey}") List<UsageCount> root(@PathParam("datasetKey") UUID datasetKey); @GET @Path("rootNub") TreeContainer<UsageCount, Integer> rootNub(); @GET @Path("search") SearchResponse<NameUsageSearchResult, NameUsageSearchParameter> search(@Context NameUsageSearchRequest searchRequest); @Path("suggest") @GET List<NameUsageSuggestResult> suggest(@Context NameUsageSuggestRequest searchSuggestRequest); }
SpeciesResource { @GET @Path("search") public SearchResponse<NameUsageSearchResult, NameUsageSearchParameter> search(@Context NameUsageSearchRequest searchRequest) { checkDeepPaging(searchRequest); return searchService.search(searchRequest); } @Inject  SpeciesResource(
      NameUsageService nameUsageService, VernacularNameService vernacularNameService,
      TypeSpecimenService typeSpecimenService, SpeciesProfileService speciesProfileService,
      ReferenceService referenceService, MultimediaService imageService, DescriptionService descriptionService,
      DistributionService distributionService, IdentifierService identifierService, NameUsageSearchService searchService,
      UsageCountMapper usageCountMapper); @GET PagingResponse<NameUsage> list(@Context Locale locale, @QueryParam(DATASET_KEY) Set<UUID> datasetKeys,
                                        @QueryParam("sourceId") String sourceId, @QueryParam("name") String canonicalName, @Context Pageable page); @GET @Path("{id}") @NullToNotFound NameUsage get(@PathParam("id") int usageKey, @Context Locale locale); @GET @Path("{id}/metrics") @NullToNotFound NameUsageMetrics getMetrics(@PathParam("id") int usageKey); @GET @Path("{id}/name") @NullToNotFound ParsedName getParsedName(@PathParam("id") int usageKey); @GET @Path("{id}/verbatim") @NullToNotFound VerbatimNameUsage getVerbatim(@PathParam("id") int usageKey); @GET @Path("{id}/children") PagingResponse<NameUsage> listChildren(@PathParam("id") int parentKey, @Context Locale locale, @Context Pageable page); @GET @Path("{id}/childrenAll") List<UsageCount> listAllChildren(@PathParam("id") int parentKey); @GET @Path("{id}/synonyms") PagingResponse<NameUsage> listSynonyms(@PathParam("id") int usageKey, @Context Locale locale, @Context Pageable page); @GET @Path("{id}/vernacularNames") PagingResponse<VernacularName> listVernacularNamesByNameUsage(@PathParam("id") int usageKey, @Context Pageable page); @GET @Path("{id}/typeSpecimens") PagingResponse<TypeSpecimen> listTypeSpecimensByNameUsage(@PathParam("id") int usageKey, @Context Pageable page); @GET @Path("{id}/speciesProfiles") PagingResponse<SpeciesProfile> listSpeciesProfilesByNameUsage(@PathParam("id") int usageKey, @Context Pageable page); @GET @Path("{id}/references") PagingResponse<Reference> listReferencesByNameUsage(@PathParam("id") int usageKey, @Context Pageable page); @GET @Path("{id}/media") PagingResponse<NameUsageMediaObject> listImagesByNameUsage(@PathParam("id") int usageKey, @Context Pageable page); @GET @Path("{id}/descriptions") PagingResponse<Description> listDescriptionsByNameUsage(@PathParam("id") int usageKey, @Context Pageable page); @GET @Path("{id}/toc") @NullToNotFound TableOfContents get(@PathParam("id") Integer key); @GET @Path("{id}/distributions") PagingResponse<Distribution> listDistributionsByNameUsage(@PathParam("id") int usageKey, @Context Pageable page); @GET @Path("{id}/identifier") PagingResponse<Identifier> listIdentifierByNameUsage(@PathParam("id") int usageKey, @Context Pageable page); @GET @Path("{id}/related") PagingResponse<NameUsage> listRelatedByNameUsage(@PathParam("id") int usageKey, @Context Locale locale, @Context Pageable page,
                                                          @QueryParam(DATASET_KEY) Set<UUID> datasetKeys); @GET @Path("{id}/combinations") List<NameUsage> listCombinations(@PathParam("id") int basionymKey, @Context Locale locale); @GET @Path("{id}/parents") List<NameUsage> listParentsByNameUsage(@PathParam("id") int usageKey, @Context Locale locale, @Context Pageable page); @GET @Path("root/{datasetKey}") PagingResponse<NameUsage> listRootUsages(@PathParam(DATASET_KEY) UUID datasetKey, @Context Locale locale, @Context Pageable page); @GET @Path("rootAll/{datasetKey}") List<UsageCount> root(@PathParam("datasetKey") UUID datasetKey); @GET @Path("rootNub") TreeContainer<UsageCount, Integer> rootNub(); @GET @Path("search") SearchResponse<NameUsageSearchResult, NameUsageSearchParameter> search(@Context NameUsageSearchRequest searchRequest); @Path("suggest") @GET List<NameUsageSuggestResult> suggest(@Context NameUsageSuggestRequest searchSuggestRequest);  }