### Question:
Negation extends ERE { public static ERE get(ERE child) { if(child.getEREType() == EREType.NEG) return child.children.get(0); return new Negation(child); } private  Negation(ERE child); static ERE get(ERE child); @Override EREType getEREType(); @Override String toString(); @Override ERE copy(); @Override boolean containsEpsilon(); @Override ERE derive(Symbol s);  }### Answer:
@Test public void testEquality() { ERE one = Negation.get(symbol); ERE one_again = Negation.get(symbol); assertEquals(one, one_again); assertEquals(0, one.compareTo(one_again)); }
@Test public void testInequality() { Epsilon epsilon = Epsilon.get(); ERE one = Negation.get(symbol); ERE two = Negation.get(epsilon); assertFalse(one.equals(two)); assertFalse(0 == one.compareTo(two)); }
@Test public void testSimplification() { ERE negation = Negation.get(symbol); ERE doubleNegation = Negation.get(negation); assertEquals(symbol, doubleNegation); }