### Question:
MigrationFileParser { public String[] getStatements(){ return this.content.split(";"); } MigrationFileParser(String content); String[] getStatements();  }### Answer:
@Test public void testSingleLineStatement() { MigrationFileParser singleLineComment = new MigrationFileParser("insert into table--comment"); String statements[] = singleLineComment.getStatements(); assertEquals("Testing single line statement size",1,statements.length); assertEquals("Testing single line statement content","insert into table",statements[0]); singleLineComment = new MigrationFileParser("insert into table--comment\n"); singleLineComment.getStatements(); assertEquals("Testing single line statement size",1,statements.length); assertEquals("Testing single line statement content","insert into table",statements[0]); }
@Test public void testMultiLineComment() { MigrationFileParser multiLineComment = new MigrationFileParser("insert into table hello"); String statements[] = multiLineComment.getStatements(); assertEquals("Testing multiline statement size",1,statements.length); assertEquals("Testing multiline comment","insert into table hello",statements[0]); }
@Test public void testMixedComment() { MigrationFileParser mixedComment = new MigrationFileParser("insert into--comment"); String statements[] = mixedComment.getStatements(); assertEquals("Testing mixed comment statement size",1,statements.length); assertEquals("Testing mixed comment statments", "insert into", statements[0]); }