Use common class for TriggerResult instead of Algebrick

fix termination tests