I have a problem in creating an unit test to a query. In the Java method, it looks like this:
public String method () {
    StringBuilder query = new StringBuilder();
    query.append(" BEGIN  ");
    query.append(" <stored procedure name> ;");
    query.append(" END; " );
    return query.toString(); }
In test methods, it must do a rollback transaction. For a classic insert / delete / update, they are added in a batch with start transaction / rollback. But I am not sure if it works for stored procedures, especially if they are contained by "begin" / "end". I need to know the same answer for PostgreSQL.
 
     
    