nodeEntry.getAttributes().put("test-attribute", "some value");
nodesYamlGenerator.addNode(nodeEntry);
nodesYamlGenerator.generate();
final String outputString = baos.toString();
assertNotNull(outputString);
//convert via yaml
Map parsed = parseYamlMap(outputString);
assertNotNull(parsed.get("strongbad"));