public void test_internal_consistency_check_99904_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"); s.setCompartment("c"); Reaction r = m.createReaction(); r.setId("r"); sr.setSpecies("s"); sr.setMetaId("mmm"); r.addProduct(sr); errors = d.checkInternalConsistency(); assertTrue( errors == 1 ); assertTrue( d.getError(0).getErrorId() == 21101 ); d = null; }