@Test(groups = SMALL) public void testGenerateCreateTriggerCreatesTheCorrectQuery() { String query = PsqlQueryGenerator.generateCreateTriggerQuery("trigger_name", "table_name", "proc_name", "stream_name"); String expected = String.format( "CREATE TRIGGER %s AFTER INSERT OR UPDATE OR DELETE ON %s FOR EACH ROW EXECUTE PROCEDURE %s('%s')", "trigger_name", "table_name", "proc_name", "stream_name"); assertEquals(query, expected); }
static String generateCreateTriggerQuery(String triggerName, String tableName, String procName, String streamName) { return format(CREATE_TRIGGER_TMPLT, triggerName, tableName, procName, streamName); }
PsqlQueryGenerator { static String generateCreateTriggerQuery(String triggerName, String tableName, String procName, String streamName) { return format(CREATE_TRIGGER_TMPLT, triggerName, tableName, procName, streamName); } }
PsqlQueryGenerator { static String generateCreateTriggerQuery(String triggerName, String tableName, String procName, String streamName) { return format(CREATE_TRIGGER_TMPLT, triggerName, tableName, procName, streamName); }  }
PsqlQueryGenerator { static String generateCreateTriggerQuery(String triggerName, String tableName, String procName, String streamName) { return format(CREATE_TRIGGER_TMPLT, triggerName, tableName, procName, streamName); }   }
PsqlQueryGenerator { static String generateCreateTriggerQuery(String triggerName, String tableName, String procName, String streamName) { return format(CREATE_TRIGGER_TMPLT, triggerName, tableName, procName, streamName); }    }