@SuppressWarnings("deprecation")
@Test
public void test_read_l1v1_branch() throws XMLStreamException, InvalidPropertiesFormatException, IOException, ClassNotFoundException {
SBMLDocument d;
Model m;
Compartment c;
KineticLaw kl;
LocalParameter p;
Reaction r;
Species s;
SpeciesReference sr;
UnitDefinition ud;
String filename = DATA_FOLDER + "/libsbml-test-data/l1v1-branch.xml";
d = new SBMLReader().readSBML(filename);
if (d == null)
;
{
}
assertTrue(d.getLevel() == 1);
assertTrue(d.getVersion() == 1);
m = d.getModel();
assertTrue(m.getName().equals("Branch"));
assertTrue(m.getNumCompartments() == 1);
c = m.getCompartment(0);
assertTrue(c.getName().equals("compartmentOne"));
assertTrue(c.getVolume() == 1);
ud = c.getDerivedUnitDefinition();
assertTrue(ud.getNumUnits() == 1);
// assertTrue(ud.getUnit(0).getKind() == Unit.Kind.LITRE); // getDerivedUnitDefinition not working properly
assertTrue(m.getNumSpecies() == 4);
s = m.getSpecies(0);