test_class.declarator: applicationService = mock(IApplicationService.class)
test_class.modifier: private static
test_class.original_string: private static IApplicationService applicationService = mock(IApplicationService.class);
test_class.type: IApplicationService
test_class.var_name: applicationService
test_class.declarator: computationService = mock(IComputationService.class)
test_class.modifier: private static
test_class.original_string: private static IComputationService computationService = mock(IComputationService.class);
test_class.type: IComputationService
test_class.var_name: computationService
test_class.declarator: executorConfig = mock(ExecutorConfig.class)
test_class.modifier: private static
test_class.original_string: private static ExecutorConfig executorConfig = mock(ExecutorConfig.class);
test_class.type: ExecutorConfig
test_class.var_name: executorConfig
test_class.declarator: tenant = "tenant"
test_class.modifier: private static
test_class.original_string: private static String tenant = "tenant";
test_class.type: String
test_class.var_name: tenant
test_class.declarator: computationName = "test-computation"
test_class.modifier: private static
test_class.original_string: private static String computationName = "test-computation";
test_class.type: String
test_class.var_name: computationName
test_class.declarator: application
test_class.modifier: private static
test_class.original_string: private static ApplicationDomain application;
test_class.type: ApplicationDomain
test_class.var_name: application
test_class.declarator: computation
test_class.modifier: private static
test_class.original_string: private static ComputationDomain computation;
test_class.type: ComputationDomain
test_class.var_name: computation
test_class.declarator: runtimeOptions
test_class.modifier: private static
test_class.original_string: private static RuntimeOptions runtimeOptions;
test_class.type: RuntimeOptions
test_class.var_name: runtimeOptions
test_class.declarator: resource
test_class.modifier: private static
test_class.original_string: private static ApplicationResource resource;
test_class.type: ApplicationResource
test_class.var_name: resource
test_class.file: fabric-manager/src/test/java/com/olacabs/fabric/manager/resource/ApplicationResourceTest.java
test_class.identifier: ApplicationResourceTest
test_case.body: @Test
      public void testGet() {
          doReturn(application).when(applicationService).get(anyString(), anyString());
  
          final Response response = resource.get(application.getTenant(), application.getName());
          Assert.assertEquals(response.getStatus(), 200);
          Assert.assertEquals(response.getEntity(), application);
      }
test_case.class_method_signature: ApplicationResourceTest.testGet()
test_case.full_signature: @Test public void testGet()
test_case.identifier: testGet
test_case.invocations: get when doReturn anyString anyString get getTenant getName assertEquals getStatus assertEquals getEntity
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGet()
focal_class.declarator: applicationService
focal_class.modifier: private final
focal_class.original_string: private final IApplicationService applicationService;
focal_class.type: IApplicationService
focal_class.var_name: applicationService
focal_class.declarator: computationService
focal_class.modifier: private final
focal_class.original_string: private final IComputationService computationService;
focal_class.type: IComputationService
focal_class.var_name: computationService
focal_class.declarator: executorConfig
focal_class.modifier: private final
focal_class.original_string: private final ExecutorConfig executorConfig;
focal_class.type: ExecutorConfig
focal_class.var_name: executorConfig
focal_class.file: fabric-manager/src/main/java/com/olacabs/fabric/manager/resource/ApplicationResource.java
focal_class.identifier: ApplicationResource
focal_class.class_method_signature: ApplicationResource.create(@PathParam("tenant") final String tenant, @PathParam("name") final String computationName,
                             @QueryParam("version") final Integer computationVersion,
                             @NotNull final RuntimeOptions runtimeOptions)
focal_class.full_signature: @POST @UserRequired @Consumes(MediaType.APPLICATION_JSON) @Timed @UnitOfWork @Path("{tenant}/{name}") @ApiOperation(value = "Creates and deploys an application for a computation given tenant and name", response = ApplicationDomain.class) public Response create(@PathParam("tenant") final String tenant, @PathParam("name") final String computationName,
                             @QueryParam("version") final Integer computationVersion,
                             @NotNull final RuntimeOptions runtimeOptions)
focal_class.identifier: create
focal_class.modifiers: @POST @UserRequired @Consumes(MediaType.APPLICATION_JSON) @Timed @UnitOfWork @Path("{tenant}/{name}") @ApiOperation(value = "Creates and deploys an application for a computation given tenant and name", response = ApplicationDomain.class) public
focal_class.parameters: (@PathParam("tenant") final String tenant, @PathParam("name") final String computationName,
                             @QueryParam("version") final Integer computationVersion,
                             @NotNull final RuntimeOptions runtimeOptions)
focal_class.return: Response
focal_class.signature: Response create(@PathParam("tenant") final String tenant, @PathParam("name") final String computationName,
                             @QueryParam("version") final Integer computationVersion,
                             @NotNull final RuntimeOptions runtimeOptions)
focal_class.class_method_signature: ApplicationResource.get(@PathParam("tenant") final String tenant, @PathParam("name") final String computationName)
focal_class.full_signature: @GET @Consumes(MediaType.APPLICATION_JSON) @Timed @UnitOfWork(transactional = false) @Path("{tenant}/{name}") @ApiOperation(value = "Get application(only metadata from db)", response = ApplicationDomain.class) public Response get(@PathParam("tenant") final String tenant, @PathParam("name") final String computationName)
focal_class.identifier: get
focal_class.modifiers: @GET @Consumes(MediaType.APPLICATION_JSON) @Timed @UnitOfWork(transactional = false) @Path("{tenant}/{name}") @ApiOperation(value = "Get application(only metadata from db)", response = ApplicationDomain.class) public
focal_class.parameters: (@PathParam("tenant") final String tenant, @PathParam("name") final String computationName)
focal_class.return: Response
focal_class.signature: Response get(@PathParam("tenant") final String tenant, @PathParam("name") final String computationName)
focal_class.class_method_signature: ApplicationResource.getFromMarathon(@PathParam("tenant") final String tenant,
                                      @PathParam("name") final String computationName)
focal_class.full_signature: @GET @Consumes(MediaType.APPLICATION_JSON) @Timed @UnitOfWork(transactional = false) @Path("{tenant}/{name}/marathon") @ApiOperation(value = "Get application details from marathon", response = Map.class) public Response getFromMarathon(@PathParam("tenant") final String tenant,
                                      @PathParam("name") final String computationName)
focal_class.identifier: getFromMarathon
focal_class.modifiers: @GET @Consumes(MediaType.APPLICATION_JSON) @Timed @UnitOfWork(transactional = false) @Path("{tenant}/{name}/marathon") @ApiOperation(value = "Get application details from marathon", response = Map.class) public
focal_class.parameters: (@PathParam("tenant") final String tenant,
                                      @PathParam("name") final String computationName)
focal_class.return: Response
focal_class.signature: Response getFromMarathon(@PathParam("tenant") final String tenant,
                                      @PathParam("name") final String computationName)
focal_class.class_method_signature: ApplicationResource.delete(@PathParam("tenant") final String tenant, @PathParam("name") final String computationName)
focal_class.full_signature: @DELETE @Consumes(MediaType.APPLICATION_JSON) @Timed @UserRequired @UnitOfWork @Path("{tenant}/{name}") @ApiOperation(value = "Delete application details from marathon and soft deletes the meta") public Response delete(@PathParam("tenant") final String tenant, @PathParam("name") final String computationName)
focal_class.identifier: delete
focal_class.modifiers: @DELETE @Consumes(MediaType.APPLICATION_JSON) @Timed @UserRequired @UnitOfWork @Path("{tenant}/{name}") @ApiOperation(value = "Delete application details from marathon and soft deletes the meta") public
focal_class.parameters: (@PathParam("tenant") final String tenant, @PathParam("name") final String computationName)
focal_class.return: Response
focal_class.signature: Response delete(@PathParam("tenant") final String tenant, @PathParam("name") final String computationName)
focal_class.class_method_signature: ApplicationResource.scale(@PathParam("tenant") final String tenant, @PathParam("name") final String computationName,
                            @NotNull final Map<String, Integer> request)
focal_class.full_signature: @PUT @Consumes(MediaType.APPLICATION_JSON) @Timed @UserRequired @UnitOfWork @Path("{tenant}/{name}/scale") @ApiOperation(value = "Scales application on marathon") public Response scale(@PathParam("tenant") final String tenant, @PathParam("name") final String computationName,
                            @NotNull final Map<String, Integer> request)
focal_class.identifier: scale
focal_class.modifiers: @PUT @Consumes(MediaType.APPLICATION_JSON) @Timed @UserRequired @UnitOfWork @Path("{tenant}/{name}/scale") @ApiOperation(value = "Scales application on marathon") public
focal_class.parameters: (@PathParam("tenant") final String tenant, @PathParam("name") final String computationName,
                            @NotNull final Map<String, Integer> request)
focal_class.return: Response
focal_class.signature: Response scale(@PathParam("tenant") final String tenant, @PathParam("name") final String computationName,
                            @NotNull final Map<String, Integer> request)
focal_class.class_method_signature: ApplicationResource.suspend(@PathParam("tenant") final String tenant, @PathParam("name") final String computationName)
focal_class.full_signature: @PUT @Consumes(MediaType.APPLICATION_JSON) @Timed @UserRequired @UnitOfWork @Path("{tenant}/{name}/suspend") @ApiOperation(value = "Suspends application on marathon") public Response suspend(@PathParam("tenant") final String tenant, @PathParam("name") final String computationName)
focal_class.identifier: suspend
focal_class.modifiers: @PUT @Consumes(MediaType.APPLICATION_JSON) @Timed @UserRequired @UnitOfWork @Path("{tenant}/{name}/suspend") @ApiOperation(value = "Suspends application on marathon") public
focal_class.parameters: (@PathParam("tenant") final String tenant, @PathParam("name") final String computationName)
focal_class.return: Response
focal_class.signature: Response suspend(@PathParam("tenant") final String tenant, @PathParam("name") final String computationName)
focal_class.class_method_signature: ApplicationResource.restart(@PathParam("tenant") final String tenant, @PathParam("name") final String computationName,
                              @QueryParam("forcefully") @DefaultValue("false") final boolean forcefully)
focal_class.full_signature: @PUT @Consumes(MediaType.APPLICATION_JSON) @Timed @UnitOfWork @UserRequired @Path("{tenant}/{name}/restart") @ApiOperation(value = "Restart application on marathon") public Response restart(@PathParam("tenant") final String tenant, @PathParam("name") final String computationName,
                              @QueryParam("forcefully") @DefaultValue("false") final boolean forcefully)
focal_class.identifier: restart
focal_class.modifiers: @PUT @Consumes(MediaType.APPLICATION_JSON) @Timed @UnitOfWork @UserRequired @Path("{tenant}/{name}/restart") @ApiOperation(value = "Restart application on marathon") public
focal_class.parameters: (@PathParam("tenant") final String tenant, @PathParam("name") final String computationName,
                              @QueryParam("forcefully") @DefaultValue("false") final boolean forcefully)
focal_class.return: Response
focal_class.signature: Response restart(@PathParam("tenant") final String tenant, @PathParam("name") final String computationName,
                              @QueryParam("forcefully") @DefaultValue("false") final boolean forcefully)
focal_class.class_method_signature: ApplicationResource.search(final String tenant, final String name, final Integer version)
focal_class.full_signature: private ComputationDomain search(final String tenant, final String name, final Integer version)
focal_class.identifier: search
focal_class.modifiers: private
focal_class.parameters: (final String tenant, final String name, final Integer version)
focal_class.return: ComputationDomain
focal_class.signature: ComputationDomain search(final String tenant, final String name, final Integer version)
focal_class.class_method_signature: ApplicationResource.create(final RuntimeOptions runtimeOptions, final ExecutorConfig execConf,
                                       final ComputationDomain computation)
focal_class.full_signature: private ApplicationDomain create(final RuntimeOptions runtimeOptions, final ExecutorConfig execConf,
                                       final ComputationDomain computation)
focal_class.identifier: create
focal_class.modifiers: private
focal_class.parameters: (final RuntimeOptions runtimeOptions, final ExecutorConfig execConf,
                                       final ComputationDomain computation)
focal_class.return: ApplicationDomain
focal_class.signature: ApplicationDomain create(final RuntimeOptions runtimeOptions, final ExecutorConfig execConf,
                                       final ComputationDomain computation)
focal_method.body: @GET
      @Consumes(MediaType.APPLICATION_JSON)
      @Timed
      @UnitOfWork(transactional = false)
      @Path("{tenant}/{name}")
      @ApiOperation(value = "Get application(only metadata from db)", response = ApplicationDomain.class)
      public Response get(@PathParam("tenant") final String tenant, @PathParam("name") final String computationName) {
          final String appName = applicationService.name(tenant, computationName);
          final ApplicationDomain applicationDomain = applicationService.get(appName, tenant);
          return Response.ok().entity(applicationDomain).build();
      }
focal_method.class_method_signature: ApplicationResource.get(@PathParam("tenant") final String tenant, @PathParam("name") final String computationName)
focal_method.full_signature: @GET @Consumes(MediaType.APPLICATION_JSON) @Timed @UnitOfWork(transactional = false) @Path("{tenant}/{name}") @ApiOperation(value = "Get application(only metadata from db)", response = ApplicationDomain.class) public Response get(@PathParam("tenant") final String tenant, @PathParam("name") final String computationName)
focal_method.identifier: get
focal_method.invocations: name get build entity ok
focal_method.modifiers: @GET @Consumes(MediaType.APPLICATION_JSON) @Timed @UnitOfWork(transactional = false) @Path("{tenant}/{name}") @ApiOperation(value = "Get application(only metadata from db)", response = ApplicationDomain.class) public
focal_method.parameters: (@PathParam("tenant") final String tenant, @PathParam("name") final String computationName)
focal_method.return: Response
focal_method.signature: Response get(@PathParam("tenant") final String tenant, @PathParam("name") final String computationName)