public void testImmutable()
{
Clause c = new Clause();
Assert.IsFalse(c.isImmutable());
c.addNegativeLiteral(new Predicate("Pred1", new List<Term>()));
c.addPositiveLiteral(new Predicate("Pred2", new List<Term>()));
c.setImmutable();
Assert.IsTrue(c.isImmutable());
//try {
c.addNegativeLiteral(new Predicate("Pred3", new List<Term>()));
Assert.Fail("Should have thrown an IllegalStateException");
//} catch (IllegalStateException ise) {
// // Ok, Expected
//}
// try {
c.addPositiveLiteral(new Predicate("Pred3", new List<Term>()));
Assert.Fail("Should have thrown an IllegalStateException");
//} catch (IllegalStateException ise) {
// Ok, Expected
//}
}