def METHOD_NAME(self, resource_group, spring):
    self.kwargs.update({
        'serviceName': spring,
        'rg': resource_group,
        'name': 'asa-java-rest-service'
    })
    result = self.cmd('spring application-accelerator predefined-accelerator list -g {rg} -s {serviceName}').get_output_in_json()
    self.assertTrue(len(result) > 0)
    self.cmd('spring application-accelerator predefined-accelerator show -n {name} -g {rg} -s {serviceName}', 
    checks=[
        self.check('properties.provisioningState', "Succeeded"),
        self.check('properties.state', "Enabled")
    ])
    self.cmd('spring application-accelerator predefined-accelerator disable -n {name} -g {rg} -s {serviceName}')
    self.cmd('spring application-accelerator predefined-accelerator show -n {name} -g {rg} -s {serviceName}', 
    checks=[
        self.check('properties.provisioningState', "Succeeded"),
        self.check('properties.state', "Disabled")
    ])
    self.cmd('spring application-accelerator predefined-accelerator enable -n {name} -g {rg} -s {serviceName}')
    self.cmd('spring application-accelerator predefined-accelerator show -n {name} -g {rg} -s {serviceName}', 
    checks=[
        self.check('properties.provisioningState', "Succeeded"),
        self.check('properties.state', "Enabled")
    ])