@Test
  public void testSearchNode() throws Exception {
    try {
      ChefUtil.createNode(name1);
      ChefUtil.putNodeAttribute(name1, "__TRANSCEND_TEST__", name1);
    } catch (Exception e) {
      // ignore failure; may have already been created.
    }

    // Search for :"name:chefutil-*";
    String search = "name%3A" + name1.substring(0, 9) + "*";
    final List<String> nodes = ChefUtil.searchNodes(search);

    // final JsonNode jsonNodes = JsonUtil.load(nodes);
    for (String node : nodes) {
      JsonNode json = JsonUtil.load(node);
      logger.debug(JsonUtil.toJsonPrettyPrintString(json));
    }
  }
  @Test
  public void testNodeUpdateRunlist() throws Exception {
    try {
      ChefUtil.createNode(name1);
      ChefUtil.putNodeAttribute(name1, "__TRANSCEND_TEST__", name1);
    } catch (Exception e) {
      // ignore failure; may have already been created.
    }

    String jsonText = ChefUtil.putNodeRunlist(name1, "role[transcend_defaultrole]");
    logger.debug(jsonText);
    jsonText = ChefUtil.getNode(name1);
    JsonNode json = JsonUtil.load(jsonText);
    logger.debug(JsonUtil.toJsonPrettyPrintString(json));
    assertThat("Node name is correct.", json.get("name").getTextValue(), is(name1));
    assertThat(
        "Node attributes are intact.",
        json.get("normal").toString(),
        containsString("__TRANSCEND_TEST__"));
  }