test_class.file: vsm/src/test/java/com/abiquo/vsm/resource/SubscriptionResourceTest.java
test_class.identifier: SubscriptionResourceTest
test_class.superclass: extends ResourceTestBase
test_case.body: @Test
      public void test_unsubscribeUnexisting()
      {
          try
          {
              subsResource.unsubscribe("15");
              fail("Physical machine with id 'vm-unexisting' should not exist");
          }
          catch (VSMException ex)
          {
              assertEquals(ex.getResponse().getStatus(), Status.NOT_FOUND.getStatusCode());
          }
      }
test_case.class_method_signature: SubscriptionResourceTest.test_unsubscribeUnexisting()
test_case.full_signature: @Test public void test_unsubscribeUnexisting()
test_case.identifier: test_unsubscribeUnexisting
test_case.invocations: unsubscribe fail assertEquals getStatus getResponse getStatusCode
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void test_unsubscribeUnexisting()
focal_class.declarator: SUBSCRIPTIONS_PATH = "subscriptions"
focal_class.modifier: public static final
focal_class.original_string: public static final String SUBSCRIPTIONS_PATH = "subscriptions";
focal_class.type: String
focal_class.var_name: SUBSCRIPTIONS_PATH
focal_class.declarator: SUBSCRIPTION_PARAM = "subs"
focal_class.modifier: public static final
focal_class.original_string: public static final String SUBSCRIPTION_PARAM = "subs";
focal_class.type: String
focal_class.var_name: SUBSCRIPTION_PARAM
focal_class.declarator: SUBSCRIPTION_PATH = "{" + SUBSCRIPTION_PARAM + "}"
focal_class.modifier: public static final
focal_class.original_string: public static final String SUBSCRIPTION_PATH = "{" + SUBSCRIPTION_PARAM + "}";
focal_class.type: String
focal_class.var_name: SUBSCRIPTION_PATH
focal_class.declarator: VIRTUAL_MACHINE_NAME_QUERY_PARAM = "virtualmachine"
focal_class.modifier: private static final
focal_class.original_string: private static final String VIRTUAL_MACHINE_NAME_QUERY_PARAM = "virtualmachine";
focal_class.type: String
focal_class.var_name: VIRTUAL_MACHINE_NAME_QUERY_PARAM
focal_class.declarator: vsmService
focal_class.modifier: protected
focal_class.original_string: protected VSMService vsmService;
focal_class.type: VSMService
focal_class.var_name: vsmService
focal_class.declarator: dao
focal_class.modifier: private
focal_class.original_string: private RedisDao dao;
focal_class.type: RedisDao
focal_class.var_name: dao
focal_class.file: vsm/src/main/java/com/abiquo/vsm/resource/SubscriptionResource.java
focal_class.identifier: SubscriptionResource
focal_class.class_method_signature: SubscriptionResource.SubscriptionResource()
focal_class.full_signature: public  SubscriptionResource()
focal_class.identifier: SubscriptionResource
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  SubscriptionResource()
focal_class.class_method_signature: SubscriptionResource.getSubscriptions(
          @QueryParam(VIRTUAL_MACHINE_NAME_QUERY_PARAM) String virtualMachineName)
focal_class.full_signature: @GET public VirtualMachinesDto getSubscriptions(
          @QueryParam(VIRTUAL_MACHINE_NAME_QUERY_PARAM) String virtualMachineName)
focal_class.identifier: getSubscriptions
focal_class.modifiers: @GET public
focal_class.parameters: (
          @QueryParam(VIRTUAL_MACHINE_NAME_QUERY_PARAM) String virtualMachineName)
focal_class.return: VirtualMachinesDto
focal_class.signature: VirtualMachinesDto getSubscriptions(
          @QueryParam(VIRTUAL_MACHINE_NAME_QUERY_PARAM) String virtualMachineName)
focal_class.class_method_signature: SubscriptionResource.subscribe(VirtualMachineDto virtualMachine)
focal_class.full_signature: @POST public VirtualMachineDto subscribe(VirtualMachineDto virtualMachine)
focal_class.identifier: subscribe
focal_class.modifiers: @POST public
focal_class.parameters: (VirtualMachineDto virtualMachine)
focal_class.return: VirtualMachineDto
focal_class.signature: VirtualMachineDto subscribe(VirtualMachineDto virtualMachine)
focal_class.class_method_signature: SubscriptionResource.unsubscribe(@PathParam(SUBSCRIPTION_PARAM) String subscriptionId)
focal_class.full_signature: @DELETE @Path(SUBSCRIPTION_PATH) public void unsubscribe(@PathParam(SUBSCRIPTION_PARAM) String subscriptionId)
focal_class.identifier: unsubscribe
focal_class.modifiers: @DELETE @Path(SUBSCRIPTION_PATH) public
focal_class.parameters: (@PathParam(SUBSCRIPTION_PARAM) String subscriptionId)
focal_class.return: void
focal_class.signature: void unsubscribe(@PathParam(SUBSCRIPTION_PARAM) String subscriptionId)
focal_class.superclass: extends AbstractResource
focal_method.body: @DELETE
      @Path(SUBSCRIPTION_PATH)
      public void unsubscribe(@PathParam(SUBSCRIPTION_PARAM) String subscriptionId)
      {
          checkSystem();
  
          subscriptionId = decodeParameter(subscriptionId);
  
          VirtualMachine vm = dao.getVirtualMachine(Integer.valueOf(subscriptionId));
          if (vm == null)
          {
              throw new VSMException(Status.NOT_FOUND, "There is no subscription with id "
                  + subscriptionId);
          }
  
          vsmService.unsubscribe(vm.getPhysicalMachine().getAddress(), vm.getPhysicalMachine()
              .getType(), vm.getName());
      }
focal_method.class_method_signature: SubscriptionResource.unsubscribe(@PathParam(SUBSCRIPTION_PARAM) String subscriptionId)
focal_method.full_signature: @DELETE @Path(SUBSCRIPTION_PATH) public void unsubscribe(@PathParam(SUBSCRIPTION_PARAM) String subscriptionId)
focal_method.identifier: unsubscribe
focal_method.invocations: checkSystem decodeParameter getVirtualMachine valueOf unsubscribe getAddress getPhysicalMachine getType getPhysicalMachine getName
focal_method.modifiers: @DELETE @Path(SUBSCRIPTION_PATH) public
focal_method.parameters: (@PathParam(SUBSCRIPTION_PARAM) String subscriptionId)
focal_method.return: void
focal_method.signature: void unsubscribe(@PathParam(SUBSCRIPTION_PARAM) String subscriptionId)