properties.put("prop1", "value1");
properties.put("prop2", "value2");
properties.put("runtime", "myruntime");
ModuleDefinition definition = reader.readModuleDefinition(null, "mymodule", properties);
SimpleModuleDefinition moduleDefinition = (SimpleModuleDefinition) definition;
assertEquals("mymodule", moduleDefinition.getName());
assertEquals(ModuleTypes.APPLICATION, moduleDefinition.getType());
assertEquals(Arrays.asList(new String[]{ "loc1", "loc2", "loc3"}), moduleDefinition.getConfigLocations());
assertEquals(Arrays.asList(new String[]{ "module1", "module2", "module3", "module4", "module5"}), moduleDefinition.getDependentModuleNames(false));
assertEquals(Arrays.asList(new String[]{ "module7", "module8"}), moduleDefinition.getDependentModuleNames(true));
Map<String,String> expectedAttributes = new HashMap<String,String>();
expectedAttributes.put("prop1", "value1");
expectedAttributes.put("prop2", "value2");
assertEquals(expectedAttributes, moduleDefinition.getAttributes());
assertEquals("myruntime", moduleDefinition.getRuntimeFramework());
assertFalse(moduleDefinition.isReloadable());
assertEquals("persistence,clustering", StringUtils.collectionToCommaDelimitedString(moduleDefinition.getCapabilities()));
}