### Question:
Concat extends ERE { private ERE simplify(){ if(children.get(0) == Empty.get()) { return Empty.get(); } else if(children.get(1) == Empty.get()) { return Empty.get(); } else if(children.get(0) == Epsilon.get()) { return children.get(1); } else if(children.get(1) == Epsilon.get()) { return children.get(0); } return this; } private  Concat(ERE left, ERE right); static ERE get(ERE left, ERE right); @Override EREType getEREType(); @Override String toString(); @Override ERE copy(); @Override boolean containsEpsilon(); @Override ERE derive(Symbol s);  }### Answer:
@Test public void testSimplify() { Epsilon epsilon = Epsilon.get(); Empty empty = Empty.get(); assertEquals(empty, Concat.get(a, empty)); assertEquals(empty, Concat.get(empty, a)); assertEquals(a, Concat.get(a, epsilon)); assertEquals(a, Concat.get(epsilon, a)); assertEquals(empty, Concat.get(epsilon, empty)); assertEquals(empty, Concat.get(empty, epsilon)); }