public void test_internal_consistency_check_99911_speciesRef() { SBMLDocument d = new SBMLDocument(2,4); long errors; SpeciesReference sr = new SpeciesReference(2,4); d.setLevelAndVersion(1,2,false); Model m = d.createModel(); Compartment c = m.createCompartment(); c.setId("c"); Species s = m.createSpecies(); s.setId("s"); Reaction r = m.createReaction(); r.setId("r"); s.setCompartment("c"); sr.setSpecies("s"); sr.setSBOTerm(4); r.addReactant(sr); errors = d.checkInternalConsistency(); assertTrue( errors == 1 ); assertTrue( d.getError(0).getErrorId() == 21101 ); d = null; }