test_class.declarator: service = mock(ComponentService.class)
test_class.modifier: private static
test_class.original_string: private static IComponentService service = mock(ComponentService.class);
test_class.type: IComponentService
test_class.var_name: service
test_class.declarator: scanner = mock(JarScanner.class)
test_class.modifier: private static
test_class.original_string: private static JarScanner scanner = mock(JarScanner.class);
test_class.type: JarScanner
test_class.var_name: scanner
test_class.declarator: component
test_class.modifier: private static
test_class.original_string: private static ComponentDomain component;
test_class.type: ComponentDomain
test_class.var_name: component
test_class.declarator: resource
test_class.modifier: private static
test_class.original_string: private static ComponentResource resource;
test_class.type: ComponentResource
test_class.var_name: resource
test_class.file: fabric-manager/src/test/java/com/olacabs/fabric/manager/resource/ComponentResourceTest.java
test_class.identifier: ComponentResourceTest
test_case.body: @Test
      public void testSearch() {
          doReturn(ImmutableSet.of(component)).when(service).search(anyString(), anyString(), anyString());
  
          final Response response =
                  resource.search(component.getNamespace(), component.getName(), component.getVersion());
          Assert.assertEquals(response.getStatus(), 200);
          Assert.assertEquals(response.getEntity(), ImmutableSet.of(component));
      }
test_case.class_method_signature: ComponentResourceTest.testSearch()
test_case.full_signature: @Test public void testSearch()
test_case.identifier: testSearch
test_case.invocations: search when doReturn of anyString anyString anyString search getNamespace getName getVersion assertEquals getStatus assertEquals getEntity of
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSearch()
focal_class.declarator: service
focal_class.modifier: private final
focal_class.original_string: private final IComponentService service;
focal_class.type: IComponentService
focal_class.var_name: service
focal_class.declarator: artifactoryPath
focal_class.modifier: private final
focal_class.original_string: private final String artifactoryPath;
focal_class.type: String
focal_class.var_name: artifactoryPath
focal_class.declarator: scanner
focal_class.modifier: private final
focal_class.original_string: private final JarScanner scanner;
focal_class.type: JarScanner
focal_class.var_name: scanner
focal_class.file: fabric-manager/src/main/java/com/olacabs/fabric/manager/resource/ComponentResource.java
focal_class.identifier: ComponentResource
focal_class.class_method_signature: ComponentResource.save(@NotNull @Valid final ComponentDomain component)
focal_class.full_signature: @POST @Consumes(MediaType.APPLICATION_JSON) @Timed @UnitOfWork @UserRequired @ApiOperation(value = "Save computation", response = ComponentDomain.class) public Response save(@NotNull @Valid final ComponentDomain component)
focal_class.identifier: save
focal_class.modifiers: @POST @Consumes(MediaType.APPLICATION_JSON) @Timed @UnitOfWork @UserRequired @ApiOperation(value = "Save computation", response = ComponentDomain.class) public
focal_class.parameters: (@NotNull @Valid final ComponentDomain component)
focal_class.return: Response
focal_class.signature: Response save(@NotNull @Valid final ComponentDomain component)
focal_class.class_method_signature: ComponentResource.getAllGroupedByVersion(@QueryParam("namespace") final String namespace,
              @QueryParam("name") final String name)
focal_class.full_signature: @GET @Path("/versions") @Timed @UnitOfWork(transactional = false) @ApiOperation(value = "Get all computation grouped by version", response = ComponentDomain.class) public Response getAllGroupedByVersion(@QueryParam("namespace") final String namespace,
              @QueryParam("name") final String name)
focal_class.identifier: getAllGroupedByVersion
focal_class.modifiers: @GET @Path("/versions") @Timed @UnitOfWork(transactional = false) @ApiOperation(value = "Get all computation grouped by version", response = ComponentDomain.class) public
focal_class.parameters: (@QueryParam("namespace") final String namespace,
              @QueryParam("name") final String name)
focal_class.return: Response
focal_class.signature: Response getAllGroupedByVersion(@QueryParam("namespace") final String namespace,
              @QueryParam("name") final String name)
focal_class.class_method_signature: ComponentResource.get(@PathParam("namespace") final String namespace, @PathParam("name") final String name,
              @PathParam("version") final String version)
focal_class.full_signature: @GET @Path("/{namespace}/{name}/{version}") @Timed @UnitOfWork(transactional = false) @ApiOperation(value = "Get component based on namespace, name and version", response = ComponentDomain.class) public Response get(@PathParam("namespace") final String namespace, @PathParam("name") final String name,
              @PathParam("version") final String version)
focal_class.identifier: get
focal_class.modifiers: @GET @Path("/{namespace}/{name}/{version}") @Timed @UnitOfWork(transactional = false) @ApiOperation(value = "Get component based on namespace, name and version", response = ComponentDomain.class) public
focal_class.parameters: (@PathParam("namespace") final String namespace, @PathParam("name") final String name,
              @PathParam("version") final String version)
focal_class.return: Response
focal_class.signature: Response get(@PathParam("namespace") final String namespace, @PathParam("name") final String name,
              @PathParam("version") final String version)
focal_class.class_method_signature: ComponentResource.search(@QueryParam("namespace") final String namespace, @QueryParam("name") final String name,
              @QueryParam("version") final String version)
focal_class.full_signature: @GET @Timed @UnitOfWork(transactional = false) @ApiOperation(value = "Searches component based on param", response = Set.class) public Response search(@QueryParam("namespace") final String namespace, @QueryParam("name") final String name,
              @QueryParam("version") final String version)
focal_class.identifier: search
focal_class.modifiers: @GET @Timed @UnitOfWork(transactional = false) @ApiOperation(value = "Searches component based on param", response = Set.class) public
focal_class.parameters: (@QueryParam("namespace") final String namespace, @QueryParam("name") final String name,
              @QueryParam("version") final String version)
focal_class.return: Response
focal_class.signature: Response search(@QueryParam("namespace") final String namespace, @QueryParam("name") final String name,
              @QueryParam("version") final String version)
focal_class.class_method_signature: ComponentResource.get(@PathParam("id") final int internalId)
focal_class.full_signature: @GET @Path("/{id}") @UnitOfWork(transactional = false) @ApiOperation(value = "Get component by id", response = ComponentDomain.class) public Response get(@PathParam("id") final int internalId)
focal_class.identifier: get
focal_class.modifiers: @GET @Path("/{id}") @UnitOfWork(transactional = false) @ApiOperation(value = "Get component by id", response = ComponentDomain.class) public
focal_class.parameters: (@PathParam("id") final int internalId)
focal_class.return: Response
focal_class.signature: Response get(@PathParam("id") final int internalId)
focal_class.class_method_signature: ComponentResource.register(@Context final UriInfo uriinfo, @QueryParam("url") final String url)
focal_class.full_signature: @POST @Consumes(MediaType.APPLICATION_JSON) @Path("/register") @Timed @UnitOfWork @UserRequired @ApiOperation(value = "Registers a processor/source jar from url", response = List.class) public Response register(@Context final UriInfo uriinfo, @QueryParam("url") final String url)
focal_class.identifier: register
focal_class.modifiers: @POST @Consumes(MediaType.APPLICATION_JSON) @Path("/register") @Timed @UnitOfWork @UserRequired @ApiOperation(value = "Registers a processor/source jar from url", response = List.class) public
focal_class.parameters: (@Context final UriInfo uriinfo, @QueryParam("url") final String url)
focal_class.return: Response
focal_class.signature: Response register(@Context final UriInfo uriinfo, @QueryParam("url") final String url)
focal_class.class_method_signature: ComponentResource.registerFromArtifactory(@Context UriInfo uriinfo,
              @NotNull final ArtifactoryRegistrationRequest request)
focal_class.full_signature: @UserRequired @POST @Consumes(MediaType.APPLICATION_JSON) @Path("/artifact") @Timed @UnitOfWork @ApiOperation(value = "Registers a processor/source jar from artifactory", response = List.class) public Response registerFromArtifactory(@Context UriInfo uriinfo,
              @NotNull final ArtifactoryRegistrationRequest request)
focal_class.identifier: registerFromArtifactory
focal_class.modifiers: @UserRequired @POST @Consumes(MediaType.APPLICATION_JSON) @Path("/artifact") @Timed @UnitOfWork @ApiOperation(value = "Registers a processor/source jar from artifactory", response = List.class) public
focal_class.parameters: (@Context UriInfo uriinfo,
              @NotNull final ArtifactoryRegistrationRequest request)
focal_class.return: Response
focal_class.signature: Response registerFromArtifactory(@Context UriInfo uriinfo,
              @NotNull final ArtifactoryRegistrationRequest request)
focal_class.class_method_signature: ComponentResource.transform(final ComponentMetadata metadata)
focal_class.full_signature: private ComponentDomain transform(final ComponentMetadata metadata)
focal_class.identifier: transform
focal_class.modifiers: private
focal_class.parameters: (final ComponentMetadata metadata)
focal_class.return: ComponentDomain
focal_class.signature: ComponentDomain transform(final ComponentMetadata metadata)
focal_method.body: @GET
      @Timed
      @UnitOfWork(transactional = false)
      @ApiOperation(value = "Searches component based on param", response = Set.class)
      public Response search(@QueryParam("namespace") final String namespace, @QueryParam("name") final String name,
              @QueryParam("version") final String version) {
          return Response.ok().entity(service.search(namespace, name, version)).build();
      }
focal_method.class_method_signature: ComponentResource.search(@QueryParam("namespace") final String namespace, @QueryParam("name") final String name,
              @QueryParam("version") final String version)
focal_method.full_signature: @GET @Timed @UnitOfWork(transactional = false) @ApiOperation(value = "Searches component based on param", response = Set.class) public Response search(@QueryParam("namespace") final String namespace, @QueryParam("name") final String name,
              @QueryParam("version") final String version)
focal_method.identifier: search
focal_method.invocations: build entity ok search
focal_method.modifiers: @GET @Timed @UnitOfWork(transactional = false) @ApiOperation(value = "Searches component based on param", response = Set.class) public
focal_method.parameters: (@QueryParam("namespace") final String namespace, @QueryParam("name") final String name,
              @QueryParam("version") final String version)
focal_method.return: Response
focal_method.signature: Response search(@QueryParam("namespace") final String namespace, @QueryParam("name") final String name,
              @QueryParam("version") final String version)