@SuppressWarnings("deprecation")
  @Test
  public void testStoreProperties() throws Exception {
    KernelServices services =
        this.createKernelServicesBuilder().setSubsystemXml(this.getSubsystemXml()).build();

    PathAddress address =
        getRemoteCacheStoreAddress(
            "maximal", InvalidationCacheResourceDefinition.WILDCARD_PATH.getKey(), "invalid");
    String key = "infinispan.client.hotrod.ping_on_startup";
    String value = "true";

    ModelNode operation =
        Operations.createMapPutOperation(
            address, StoreResourceDefinition.Attribute.PROPERTIES, key, value);
    ModelNode result = services.executeOperation(operation);
    Assert.assertEquals(result.toString(), SUCCESS, result.get(OUTCOME).asString());
    Assert.assertFalse(result.get(RESULT).isDefined());

    operation =
        Operations.createMapGetOperation(
            address, StoreResourceDefinition.Attribute.PROPERTIES, key);
    result = services.executeOperation(operation);
    Assert.assertEquals(result.toString(), SUCCESS, result.get(OUTCOME).asString());
    Assert.assertEquals(value, result.get(RESULT).asString());

    operation =
        Operations.createMapRemoveOperation(
            address, StoreResourceDefinition.Attribute.PROPERTIES, key);
    result = services.executeOperation(operation);
    Assert.assertEquals(result.toString(), SUCCESS, result.get(OUTCOME).asString());
    Assert.assertFalse(result.get(RESULT).isDefined());

    operation =
        Operations.createMapGetOperation(
            address, StoreResourceDefinition.Attribute.PROPERTIES, key);
    result = services.executeOperation(operation);
    Assert.assertEquals(result.toString(), SUCCESS, result.get(OUTCOME).asString());
    Assert.assertFalse(result.get(RESULT).isDefined());

    // Validate that properties can still be added/removed/updated via child property resources
    PathAddress propertyAddress = address.append(StorePropertyResourceDefinition.pathElement(key));
    operation =
        Operations.createAddOperation(
            propertyAddress,
            Collections.<Attribute, ModelNode>singletonMap(
                new SimpleAttribute(StorePropertyResourceDefinition.VALUE), new ModelNode(value)));
    result = services.executeOperation(operation);
    Assert.assertEquals(result.toString(), SUCCESS, result.get(OUTCOME).asString());
    Assert.assertFalse(result.get(RESULT).isDefined());

    operation =
        Operations.createMapGetOperation(
            address, StoreResourceDefinition.Attribute.PROPERTIES, key);
    result = services.executeOperation(operation);
    Assert.assertEquals(result.toString(), SUCCESS, result.get(OUTCOME).asString());
    Assert.assertEquals(value, result.get(RESULT).asString());

    value = "false";
    operation =
        Operations.createWriteAttributeOperation(
            propertyAddress,
            new SimpleAttribute(StorePropertyResourceDefinition.VALUE),
            new ModelNode(value));
    result = services.executeOperation(operation);
    Assert.assertEquals(result.toString(), SUCCESS, result.get(OUTCOME).asString());
    Assert.assertFalse(result.get(RESULT).isDefined());

    operation =
        Operations.createMapGetOperation(
            address, StoreResourceDefinition.Attribute.PROPERTIES, key);
    result = services.executeOperation(operation);
    Assert.assertEquals(result.toString(), SUCCESS, result.get(OUTCOME).asString());
    Assert.assertEquals(value, result.get(RESULT).asString());

    operation =
        Operations.createReadAttributeOperation(
            propertyAddress, new SimpleAttribute(StorePropertyResourceDefinition.VALUE));
    result = services.executeOperation(operation);
    Assert.assertEquals(result.toString(), SUCCESS, result.get(OUTCOME).asString());
    Assert.assertEquals(value, result.get(RESULT).asString());

    operation = Util.createRemoveOperation(propertyAddress);
    result = services.executeOperation(operation);
    Assert.assertEquals(result.toString(), SUCCESS, result.get(OUTCOME).asString());
    Assert.assertFalse(result.get(RESULT).isDefined());

    operation =
        Operations.createMapGetOperation(
            address, StoreResourceDefinition.Attribute.PROPERTIES, key);
    result = services.executeOperation(operation);
    Assert.assertEquals(result.toString(), SUCCESS, result.get(OUTCOME).asString());
    Assert.assertFalse(result.get(RESULT).isDefined());
  }