### Question:
FSM { static public FSM get(ERE input, Symbol[] events) { return new FSM(input, events); } private  FSM(ERE input, Symbol[] events); static FSM get(ERE input, Symbol[] events); void print(PrintStream p); public LinkedHashMap<ERE, LinkedHashMap<Symbol, ERE>> contents; public LinkedHashSet<ERE> match; }### Answer:
@Test public void testConcat() { ERE ab = Concat.get(a, b); String fsm = "s0 [" + NEWLINE + " a -> s1" + NEWLINE + "]" + NEWLINE + "s1 [" + NEWLINE + " b -> s2" + NEWLINE + "]" + NEWLINE + "s2 [" + NEWLINE + "]" + NEWLINE + "alias match = s2 " + NEWLINE; assertEquals(fsm, printFSM(ab, a, b)); }
@Test public void testOr() { ERE or = Or.get(new ArrayList<ERE>(Arrays.asList(a, b))); String fsm = "s0 [" + NEWLINE + " a -> s1" + NEWLINE + " b -> s1" + NEWLINE + "]" + NEWLINE + "s1 [" + NEWLINE + "]" + NEWLINE + "alias match = s1 " + NEWLINE; assertEquals(fsm, printFSM(or, a, b)); }
@Test public void testKleene() { ERE aStar = Kleene.get(a); String fsm = "s0 [" + NEWLINE + " a -> s0" + NEWLINE + "]" + NEWLINE + "alias match = s0 " + NEWLINE; assertEquals(fsm, printFSM(aStar, a)); }