public class UtilityTest {
@Test
public void addAsLastNonSubmitStatementTest() {
StatementsFactory fac = StatementsFactory.eINSTANCE;
List<Statement> l = new ArrayList<Statement>();
l.add(fac.createEmptyStatement());
l.add(fac.createEmptyStatement());
l.add(fac.createSubmitStatement());
Utility.addAsLastNonSubmitStatement(fac.createConnectionStatement(), l);
assertEquals(4, l.size());
assertTrue(l.get(3) instanceof SubmitStatement);
assertTrue(l.get(2) instanceof ConnectionStatement);
}