@Test
public void testNdbRecognizedLines() throws IOException, MetadataParseException {

  String content = IoUtils.readContentFromClasspath("testgithub/testorg/testrepo/master/cookbooks/hopshadoop/ndb-chef/metadata.rb");
  MetadataRb metadatarb = MetadataParser.parse(content);
  assertEquals("ndb", metadatarb.getName());
  assertEquals("Installs/Configures NDB (MySQL Cluster)", metadatarb.getDescription());
  assertEquals("1.0", metadatarb.getVersion());
  List<Recipe> recipes = metadatarb.getRecipes();
  assertEquals(11, recipes.size());
  assertEquals("ndb::install", recipes.get(0).getName());
  assertEquals("Installs MySQL Cluster binaries", recipes.get(0).getDescription());
  assertEquals("ndb::purge", recipes.get(10).getName());
  assertEquals("Removes all data and all binaries related to a MySQL Cluster installation",
      recipes.get(10).getDescription());
  List<Attribute> attributes = metadatarb.getAttributes();
  assertEquals(45, attributes.size());
  assertEquals("ndb/ports", attributes.get(0).getName());
  assertEquals("Dummy ports", attributes.get(0).getDescription());
  assertEquals("array", attributes.get(0).getType());
  assertEquals("required", attributes.get(0).getRequired());
  assertEquals(Lists.newArrayList("123", "134", "145"), attributes.get(0).getDefault());
  assertEquals("ndb/DataMemory", attributes.get(1).getName());
  assertEquals("Data memory for each MySQL Cluster Data Node", attributes.get(1).getDescription());
  assertEquals("string", attributes.get(1).getType());
  assertEquals("required", attributes.get(1).getRequired());
  assertEquals("80", attributes.get(1).getDefault());
  assertEquals("kagent/enabled", attributes.get(44).getName());
  assertEquals("Install kagent", attributes.get(44).getDescription());
  assertEquals("string", attributes.get(44).getType());
  assertEquals("optional", attributes.get(44).getRequired());
  assertEquals("false", attributes.get(44).getDefault());
}